mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
feat(Webhook): add type property and created* getters (#3585)
* feat(Webhook): add created* getters * feat(Webhook): add type property * typings(WebhookFields): use primitive string for url getter Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com> * fix(Webhook): token can be null Co-authored-by: Gryffon Bellish <owenbellish@gmail.com>
This commit is contained in:
@@ -628,6 +628,19 @@ exports.MembershipStates = [
|
||||
'ACCEPTED',
|
||||
];
|
||||
|
||||
/**
|
||||
* The value set for a webhook's type:
|
||||
* * Incoming
|
||||
* * Channel Follower
|
||||
* @typedef {string} WebhookTypes
|
||||
*/
|
||||
exports.WebhookTypes = [
|
||||
// They start at 1
|
||||
null,
|
||||
'Incoming',
|
||||
'Channel Follower',
|
||||
];
|
||||
|
||||
function keyMirror(arr) {
|
||||
let tmp = Object.create(null);
|
||||
for (const value of arr) tmp[value] = value;
|
||||
|
||||
Reference in New Issue
Block a user