feat: handle and forward WEBHOOKS_UPDATE events (#2762)

* src: Handle WEBHOOK_UPDATE events

* Commit rename of 77'
Or adding the letter S

* I missed this

* Properly do this now
Typos everywhere

* Typings

* refactor: remove now unnecessary guild variable
This commit is contained in:
Frangu Vlad
2018-08-21 11:38:35 +03:00
committed by SpaceEEC
parent ab0ede0d5a
commit 0401b8ad77
4 changed files with 28 additions and 2 deletions

7
typings/index.d.ts vendored
View File

@@ -140,7 +140,8 @@ declare module 'discord.js' {
public on(event: 'roleUpdate', listener: (oldRole: Role, newRole: Role) => void): this;
public on(event: 'typingStart' | 'typingStop', listener: (channel: Channel, user: User) => void): this;
public on(event: 'userUpdate', listener: (oldUser: User, newUser: User) => void): this;
public once(event: 'voiceStateUpdate', listener: (oldState: VoiceState, newState: VoiceState) => void): this;
public on(event: 'voiceStateUpdate', listener: (oldState: VoiceState, newState: VoiceState) => void): this;
public on(event: 'webhookUpdate', listener: (channel: TextChannel) => void): this;
public on(event: string, listener: Function): this;
public once(event: 'channelCreate' | 'channelDelete', listener: (channel: Channel) => void): this;
@@ -171,6 +172,7 @@ declare module 'discord.js' {
public once(event: 'typingStart' | 'typingStop', listener: (channel: Channel, user: User) => void): this;
public once(event: 'userUpdate', listener: (oldUser: User, newUser: User) => void): this;
public once(event: 'voiceStateUpdate', listener: (oldState: VoiceState, newState: VoiceState) => void): this;
public once(event: 'webhookUpdate', listener: (channel: TextChannel) => void): this;
public once(event: string, listener: Function): this;
}
@@ -1976,7 +1978,8 @@ declare module 'discord.js' {
| 'PRESENCE_UPDATE'
| 'VOICE_STATE_UPDATE'
| 'TYPING_START'
| 'VOICE_SERVER_UPDATE';
| 'VOICE_SERVER_UPDATE'
| 'WEBHOOKS_UPDATE';
//#endregion
}