Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for type 20 message (Interaction message) #1148

Merged
merged 3 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ declare namespace Eris {
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING: 16;
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING: 17;
REPLY: 19;
APPLICATION_COMMAND: 20;
};
Permissions: {
createInstantInvite: 1;
Expand Down
3 changes: 2 additions & 1 deletion lib/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ module.exports.MessageTypes = {
GUILD_DISCOVERY_REQUALIFIED: 15,
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING: 16,
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING: 17,
REPLY: 19
REPLY: 19,
APPLICATION_COMMAND: 20
flamableassassin marked this conversation as resolved.
Show resolved Hide resolved
};

module.exports.ChannelTypes = {
Expand Down
3 changes: 3 additions & 0 deletions lib/structures/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ class Message extends Base {
case MessageTypes.REPLY: {
break;
}
case MessageTypes.APPLICATION_COMMAND: {
break;
}
default: {
client.emit("warn", `Unhandled MESSAGE_CREATE type: ${JSON.stringify(data, null, 2)}`);
break;
Expand Down