Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit daedb2b
Author: Donovan Daniels <hewwo@yiff.rocks>
Date:   Thu Sep 2 16:40:24 2021 -0500

    Sticker Sending (abalabahaha#1252)

    Co-Authored-By: Catboy <elijahchristopherjohnson@gmail.com>
    Co-authored-by: bsian03 <chharry321@gmail.com>

commit e357991
Author: 5antos <66580910+5antos@users.noreply.github.com>
Date:   Sun Aug 29 23:18:45 2021 +0100

    Enhancements for VoiceChannel join methods (abalabahaha#1195)

    Co-authored-by: Almeida <almeidx@pm.me>
    Co-authored-by: bsian03 <chharry321@gmail.com>

commit 53da0d5
Author: HeadTriXz <32986761+HeadTriXz@users.noreply.github.com>
Date:   Sat Aug 21 22:47:13 2021 +0200

    Better types for events (abalabahaha#1242)

    Co-authored-by: HeadTriXz <headtrixz@outlook.com>

commit 5246da9
Author: abalabahaha <hi@abal.moe>
Date:   Thu Aug 19 13:08:56 2021 +0000

    Bump dev version

commit 6331536
Author: NeTT <56877379+retraigo@users.noreply.github.com>
Date:   Thu Aug 19 18:29:06 2021 +0530

    Pass user data with member in Message constructor (abalabahaha#1260)

    Prevents "User associated with Member not found"

commit a58cd69
Author: bsian03 <chharry321@gmail.com>
Date:   Thu Aug 19 13:55:33 2021 +0100

    Support per-guild avatars (abalabahaha#1219)

commit 21a3ce5
Author: Erin <erin20913@gmail.com>
Date:   Thu Aug 19 08:40:54 2021 -0400

    Add decodeReasons to typings (abalabahaha#1250)

commit 120f917
Author: bsian03 <chharry321@gmail.com>
Date:   Thu Aug 19 13:05:33 2021 +0100

    Expose components (abalabahaha#1189)

    Co-authored-by: HeadTriXz <32986761+HeadTriXz@users.noreply.github.com>
    Co-authored-by: HeadTriXz <32986761+HeadTriXz@users.noreply.github.com>
    Co-authored-by: Tsumari <lucasflicky@hotmail.com>
    Co-authored-by: Catboi <50190590+Catboi8@users.noreply.github.com>

commit 1e95e62
Author: bsian03 <chharry321@gmail.com>
Date:   Thu Aug 19 12:48:23 2021 +0100

    Warn when invalid intent is supplied (abalabahaha#1261)

commit a7bff54
Author: iiFDCT <35053522+iiFDCT@users.noreply.github.com>
Date:   Thu Aug 19 12:46:51 2021 +0100

    Use new permission, intent names (abalabahaha#1257)

commit c31685e
Author: bsian03 <chharry321@gmail.com>
Date:   Thu Aug 19 12:44:57 2021 +0100

    Improve v8 ratelimit handling (abalabahaha#1256)

commit 1e4d78a
Author: bsian03 <chharry321@gmail.com>
Date:   Thu Aug 19 12:28:14 2021 +0100

    Expose audit log events 83-85 (abalabahaha#1213)

    * Audit log types 83-85

    * Update the comment

commit 840227e
Author: bsian03 <chharry321@gmail.com>
Date:   Thu Aug 19 12:19:02 2021 +0100

    Type guild features as actual values (abalabahaha#1212)

commit 4bb65f0
Author: Emad Abdullah <ea@ea.sa>
Date:   Thu Aug 5 00:04:44 2021 +0300

    fix permissions: Value "undefined" is not int for editRole & createRole (abalabahaha#1249)

commit 756943d
Author: Donovan Daniels <hewwo@yiff.rocks>
Date:   Wed Aug 4 15:58:35 2021 -0500

    Fix documentation for create/editRole (abalabahaha#1248)

commit 3d80d20
Author: Ashesh <3626859+Ashesh3@users.noreply.github.com>
Date:   Wed Aug 4 15:10:37 2021 +0530

    Mark ClientOptions in Eris function as required (abalabahaha#1255)

commit ee960c0
Author: bsian03 <chharry321@gmail.com>
Date:   Tue Jul 13 21:25:57 2021 +0100

    Fix possibly undefined member in voiceStateUpdate (abalabahaha#1217)

    Co-authored-by: Erin <erin20913@gmail.com>

commit e194a71
Author: Khaaz <khaaz.dev@gmail.com>
Date:   Tue Jul 13 13:04:21 2021 +0200

    REST v8, Gateway v8 (abalabahaha#1038)

    Co-authored-by: macdja38 <jakeincanada@icloud.com>
    Co-authored-by: bsian03 <chharry321@gmail.com>
    Co-authored-by: abalabahaha <hi@abal.moe>

commit 0726aae
Author: geg <65479041+gegdev@users.noreply.github.com>
Date:   Tue Jul 13 06:35:08 2021 -0400

    Use embeds array in embed example (abalabahaha#1244)

commit 8e9a2b7
Author: Reinhardt <73813638+NotMarx@users.noreply.github.com>
Date:   Tue Jul 13 17:34:33 2021 +0700

    Support sending multiple embeds (abalabahaha#1239)

commit 7e55222
Author: bsian03 <chharry321@gmail.com>
Date:   Mon Jul 12 18:25:00 2021 +0100

    Allow passing a plain object to permissionsOf (abalabahaha#1224)

    Co-authored by: curtisf <caf203@gmail.com>

commit 0abf61a
Author: bsian03 <chharry321@gmail.com>
Date:   Sun Jul 11 12:14:44 2021 +0100

    Expose Guild#nsfwLevel, deprecate Guild#nsfw (abalabahaha#1207)

commit 11d21c9
Author: Avocado <43632131+Awoocado@users.noreply.github.com>
Date:   Wed Jul 7 02:20:21 2021 -0500

    Update Endpoints.js (abalabahaha#1241)

commit d4a49a6
Author: bsian03 <chharry321@gmail.com>
Date:   Tue Jul 6 23:38:36 2021 +0100

    Document disconnecting members from vc better (abalabahaha#1202)

    * Update Member.js

    * Update Guild.js

    * Update Client.js

    * No idea how that happened

commit b483ff3
Author: iiFDCT <35053522+iiFDCT@users.noreply.github.com>
Date:   Tue Jul 6 16:21:56 2021 +0100

    Update sticker properties (abalabahaha#1237)

    * Use `sticker_items`

    * Docs

    * Update docs

    * Deprecate `stickers`, use `sticker_items`

    * Add user to cache

    * Empty string

    * Use camelCase

    * Wrong func

    * Docs

    * Add back useless property

    * Pretend like this variable ever gets defined

    * Newlines

commit 15546c4
Author: bsian03 <chharry321@gmail.com>
Date:   Mon Jul 5 22:53:50 2021 +0100

    Make purgeChannel use getMessages options (abalabahaha#1236)
  • Loading branch information
iiFDCT committed Sep 3, 2021
1 parent 8200263 commit ef632cf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 28 deletions.
33 changes: 17 additions & 16 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,6 @@ declare namespace Eris {
type VerificationLevel = 0 | 1 | 2 | 3 | 4;

// Message
type AdvancedMessageContent = {
allowedMentions?: AllowedMentions;
components?: ActionRow[];
content?: string;
/** @deprecated */
embed?: EmbedOptions;
embeds?: EmbedOptions[];
flags?: number;
messageReference?: MessageReferenceReply;
/** @deprecated */
messageReferenceID?: string;
tts?: boolean;
};
type ActionRowComponents = Button | SelectMenu;
type Button = InteractionButton | URLButton;
type Component = ActionRow | ActionRowComponents;
Expand Down Expand Up @@ -154,7 +141,7 @@ declare namespace Eris {
}
interface PartialChannel {
bitrate?: number;
id?: number;
id: string;
name?: string;
nsfw?: boolean;
parent_id?: number;
Expand Down Expand Up @@ -854,6 +841,20 @@ declare namespace Eris {
command: Command;
timeout: NodeJS.Timer;
}
interface AdvancedMessageContent {
allowedMentions?: AllowedMentions;
components?: ActionRow[];
content?: string;
/** @deprecated */
embed?: EmbedOptions;
embeds?: EmbedOptions[];
flags?: number;
messageReference?: MessageReferenceReply;
/** @deprecated */
messageReferenceID?: string;
stickerIDs?: string[];
tts?: boolean;
}
interface AllowedMentions {
everyone?: boolean;
repliedUser?: boolean;
Expand Down Expand Up @@ -1011,7 +1012,7 @@ declare namespace Eris {
interface PartialRole {
color?: number;
hoist?: boolean;
id?: number;
id: string;
mentionable?: boolean;
name?: string;
permissions?: number;
Expand Down Expand Up @@ -2369,9 +2370,9 @@ declare namespace Eris {
reactions: { [s: string]: { count: number; me: boolean } };
referencedMessage?: Message | null;
roleMentions: string[];
stickerItems?: StickerItems[];
/** @deprecated */
stickers?: Sticker[];
stickerItems?: StickerItems[];
timestamp: number;
tts: boolean;
type: number;
Expand Down
14 changes: 2 additions & 12 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ class Client extends EventEmitter {
* @arg {String} [content.messageReference.guildID] The guild ID of the referenced message
* @arg {String} content.messageReference.messageID The message ID of the referenced message. This cannot reference a system message
* @arg {String} [content.messageReferenceID] [DEPRECATED] The ID of the message should be replied to. Use `messageReference` instead
* @arg {Array<String>} [content.stickerIDs] An array of IDs corresponding to stickers to send
* @arg {Boolean} [content.tts] Set the message TTS flag
* @arg {Object | Array<Object>} [file] A file object (or an Array of them)
* @arg {Buffer} file.file A buffer containing file data
Expand All @@ -621,13 +622,12 @@ class Client extends EventEmitter {
};
} else if(content.content !== undefined && typeof content.content !== "string") {
content.content = "" + content.content;
} else if(content.content === undefined && !content.embed && !content.embeds && !file) {
return Promise.reject(new Error("No content, file, or embeds"));
} else if(content.embed && !content.embeds) {
this.emit("warn", "[DEPRECATED] content.embed is deprecated. Use content.embeds instead");
content.embeds = [content.embed];
}
content.allowed_mentions = this._formatAllowedMentions(content.allowedMentions);
content.sticker_ids = content.stickerIDs;
if(content.messageReference) {
content.message_reference = content.messageReference;
if(content.messageReference.messageID !== undefined) {
Expand All @@ -650,8 +650,6 @@ class Client extends EventEmitter {
this.emit("warn", "[DEPRECATED] content.messageReferenceID is deprecated. Use content.messageReference instead");
content.message_reference = {message_id: content.messageReferenceID};
}
} else if(!file) {
return Promise.reject(new Error("No content, file, or embeds"));
}
return this.requestHandler.request("POST", Endpoints.CHANNEL_MESSAGES(channelID), true, content, file).then((message) => new Message(message, this));
}
Expand Down Expand Up @@ -1281,8 +1279,6 @@ class Client extends EventEmitter {
};
} else if(content.content !== undefined && typeof content.content !== "string") {
content.content = "" + content.content;
} else if(content.content === undefined && !content.embed && !content.embeds && !content.components && content.flags === undefined) {
return Promise.reject(new Error("No content, embeds, components or flags"));
} else if(content.embed && !content.embeds) {
this.emit("warn", "[DEPRECATED] content.embed is deprecated. Use content.embeds instead");
content.embeds = [content.embed];
Expand Down Expand Up @@ -1549,9 +1545,6 @@ class Client extends EventEmitter {
* @returns {Promise<Message>}
*/
editWebhookMessage(webhookID, token, messageID, options) {
if(!options.content && !options.embeds && !options.components && !options.file) {
return Promise.reject(new Error("No content, embed, components, or file"));
}
if(options.allowedMentions) {
options.allowed_mentions = this._formatAllowedMentions(options.allowedMentions);
}
Expand Down Expand Up @@ -1631,9 +1624,6 @@ class Client extends EventEmitter {
* @returns {Promise<Message?>}
*/
executeWebhook(webhookID, token, options) {
if(!options.content && !options.file && !options.embeds) {
return Promise.reject(new Error("No content, file, or embeds"));
}
return this.requestHandler.request("POST", Endpoints.WEBHOOK_TOKEN(webhookID, token) + (options.wait ? "?wait=true" : ""), !!options.auth, {
content: options.content,
embeds: options.embeds,
Expand Down
1 change: 1 addition & 0 deletions lib/structures/PrivateChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class PrivateChannel extends Channel {
* @arg {String} [content.messageReference.guildID] The guild ID of the referenced message
* @arg {String} content.messageReference.messageID The message ID of the referenced message. This cannot reference a system message
* @arg {String} [content.messageReferenceID] [DEPRECATED] The ID of the message should be replied to. Use `messageReference` instead
* @arg {Array<String>} [content.stickerIDs] An array of IDs corresponding to the stickers to send
* @arg {Boolean} [content.tts] Set the message TTS flag
* @arg {Object} [file] A file object
* @arg {Buffer} file.file A buffer containing file data
Expand Down
1 change: 1 addition & 0 deletions lib/structures/TextChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class TextChannel extends GuildChannel {
* @arg {String} [content.messageReference.guildID] The guild ID of the referenced message
* @arg {String} content.messageReference.messageID The message ID of the referenced message. This cannot reference a system message
* @arg {String} [content.messageReferenceID] [DEPRECATED] The ID of the message should be replied to. Use `messageReference` instead
* @arg {Array<String>} [content.stickerIDs] An array of IDs corresponding to the stickers to send
* @arg {Boolean} [content.tts] Set the message TTS flag
* @arg {Object} [file] A file object
* @arg {Buffer} file.file A buffer containing file data
Expand Down

0 comments on commit ef632cf

Please sign in to comment.