mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 05:52:05 +00:00
Merge pull request #810 from GusCaplan/message#type
add message#type GUS promises that this was thoroughly tested. I wanna believe him. Hydra don't kill me for merging.
This commit is contained in:
commit
2f2188fe60
3 changed files with 17 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -32,6 +32,12 @@ class Message {
|
||||||
*/
|
*/
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the message
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
this.type = Constants.MessageTypes[data.type];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The content of the message
|
* The content of the message
|
||||||
* @type {string}
|
* @type {string}
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,16 @@ exports.WSEvents = {
|
||||||
VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE',
|
VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.MessageTypes = {
|
||||||
|
0: 'DEFAULT',
|
||||||
|
1: 'RECIPIENT_ADD',
|
||||||
|
2: 'RECIPIENT_REMOVE',
|
||||||
|
3: 'CALL',
|
||||||
|
4: 'CHANNEL_NAME_CHANGE',
|
||||||
|
5: 'CHANNEL_ICON_CHANGE',
|
||||||
|
6: 'PINS_ADD',
|
||||||
|
};
|
||||||
|
|
||||||
const PermissionFlags = exports.PermissionFlags = {
|
const PermissionFlags = exports.PermissionFlags = {
|
||||||
CREATE_INSTANT_INVITE: 1 << 0,
|
CREATE_INSTANT_INVITE: 1 << 0,
|
||||||
KICK_MEMBERS: 1 << 1,
|
KICK_MEMBERS: 1 << 1,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue