fix(Message): #system non-zero message types are not guaranteed to be system (#5108)

* fix(Message): #system not all nonzero message types are system

* feat(Message): introduce system message types

* refactor(Constants): change SystemMessageTypes to be exclusionary

* fix(Constants): only need to check if type exists

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>

* fix(Constants): lint

* fix(Typings): add SystemMessageTypees to Constants

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
This commit is contained in:
X-Classified
2020-12-12 13:40:39 -08:00
committed by GitHub
parent 5b51392724
commit bb78120283
3 changed files with 13 additions and 2 deletions

View File

@@ -429,6 +429,14 @@ exports.MessageTypes = [
'REPLY',
];
/**
* The types of messages that are `System`. The available types are `MessageTypes` excluding:
* * DEFAULT
* * REPLY
* @typedef {string} SystemMessageType
*/
exports.SystemMessageTypes = exports.MessageTypes.filter(type => type && type !== 'DEFAULT' && type !== 'REPLY');
/**
* <info>Bots cannot set a `CUSTOM_STATUS`, it is only for custom statuses received from users</info>
* The type of an activity of a users presence, e.g. `PLAYING`. Here are the available types: