mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Add voiceServerUpdate event to ClientEventTypes and add type tests
Co-authored-by: almeidx <42935195+almeidx@users.noreply.github.com>
This commit is contained in:
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
@@ -5571,6 +5571,7 @@ export interface ClientEventTypes {
|
||||
typingStart: [typing: Typing];
|
||||
userUpdate: [oldUser: PartialUser | User, newUser: User];
|
||||
voiceChannelEffectSend: [voiceChannelEffect: VoiceChannelEffect];
|
||||
voiceServerUpdate: [payload: GatewayVoiceServerUpdateDispatchData];
|
||||
voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
|
||||
warn: [message: string];
|
||||
webhooksUpdate: [channel: AnnouncementChannel | ForumChannel | MediaChannel | TextChannel | VoiceChannel];
|
||||
|
||||
@@ -16,6 +16,7 @@ import type {
|
||||
APISelectMenuComponent,
|
||||
APIStringSelectComponent,
|
||||
APITextInputComponent,
|
||||
GatewayVoiceServerUpdateDispatchData,
|
||||
Locale,
|
||||
ThreadChannelType,
|
||||
WebhookType,
|
||||
@@ -1384,6 +1385,10 @@ client.on('voiceStateUpdate', ({ client: oldClient }, { client: newClient }) =>
|
||||
expectType<Client<true>>(newClient);
|
||||
});
|
||||
|
||||
client.on('voiceServerUpdate', payload => {
|
||||
expectType<GatewayVoiceServerUpdateDispatchData>(payload);
|
||||
});
|
||||
|
||||
client.on('webhooksUpdate', ({ client }) => expectType<Client<true>>(client));
|
||||
|
||||
client.on('guildCreate', async g => {
|
||||
|
||||
Reference in New Issue
Block a user