mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
refactor: Deprecate application command events (#6937)
This commit is contained in:
@@ -12,6 +12,7 @@ module.exports = (client, { d: data }) => {
|
|||||||
* Emitted when a guild application command is created.
|
* Emitted when a guild application command is created.
|
||||||
* @event Client#applicationCommandCreate
|
* @event Client#applicationCommandCreate
|
||||||
* @param {ApplicationCommand} command The command which was created
|
* @param {ApplicationCommand} command The command which was created
|
||||||
|
* @deprecated See {@link https://github.com/discord/discord-api-docs/issues/3690 this issue} for more information.
|
||||||
*/
|
*/
|
||||||
client.emit(Events.APPLICATION_COMMAND_CREATE, command);
|
client.emit(Events.APPLICATION_COMMAND_CREATE, command);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ module.exports = (client, { d: data }) => {
|
|||||||
* Emitted when a guild application command is deleted.
|
* Emitted when a guild application command is deleted.
|
||||||
* @event Client#applicationCommandDelete
|
* @event Client#applicationCommandDelete
|
||||||
* @param {ApplicationCommand} command The command which was deleted
|
* @param {ApplicationCommand} command The command which was deleted
|
||||||
|
* @deprecated See {@link https://github.com/discord/discord-api-docs/issues/3690 this issue} for more information.
|
||||||
*/
|
*/
|
||||||
client.emit(Events.APPLICATION_COMMAND_DELETE, command);
|
client.emit(Events.APPLICATION_COMMAND_DELETE, command);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ module.exports = (client, { d: data }) => {
|
|||||||
* @event Client#applicationCommandUpdate
|
* @event Client#applicationCommandUpdate
|
||||||
* @param {?ApplicationCommand} oldCommand The command before the update
|
* @param {?ApplicationCommand} oldCommand The command before the update
|
||||||
* @param {ApplicationCommand} newCommand The command after the update
|
* @param {ApplicationCommand} newCommand The command after the update
|
||||||
|
* @deprecated See {@link https://github.com/discord/discord-api-docs/issues/3690 this issue} for more information.
|
||||||
*/
|
*/
|
||||||
client.emit(Events.APPLICATION_COMMAND_UPDATE, oldCommand, newCommand);
|
client.emit(Events.APPLICATION_COMMAND_UPDATE, oldCommand, newCommand);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -128,8 +128,17 @@ exports.Events = {
|
|||||||
API_RESPONSE: 'apiResponse',
|
API_RESPONSE: 'apiResponse',
|
||||||
API_REQUEST: 'apiRequest',
|
API_REQUEST: 'apiRequest',
|
||||||
CLIENT_READY: 'ready',
|
CLIENT_READY: 'ready',
|
||||||
|
/**
|
||||||
|
* @deprecated See {@link https://github.com/discord/discord-api-docs/issues/3690 this issue} for more information.
|
||||||
|
*/
|
||||||
APPLICATION_COMMAND_CREATE: 'applicationCommandCreate',
|
APPLICATION_COMMAND_CREATE: 'applicationCommandCreate',
|
||||||
|
/**
|
||||||
|
* @deprecated See {@link https://github.com/discord/discord-api-docs/issues/3690 this issue} for more information.
|
||||||
|
*/
|
||||||
APPLICATION_COMMAND_DELETE: 'applicationCommandDelete',
|
APPLICATION_COMMAND_DELETE: 'applicationCommandDelete',
|
||||||
|
/**
|
||||||
|
* @deprecated See {@link https://github.com/discord/discord-api-docs/issues/3690 this issue} for more information.
|
||||||
|
*/
|
||||||
APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate',
|
APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate',
|
||||||
GUILD_CREATE: 'guildCreate',
|
GUILD_CREATE: 'guildCreate',
|
||||||
GUILD_DELETE: 'guildDelete',
|
GUILD_DELETE: 'guildDelete',
|
||||||
@@ -220,9 +229,9 @@ exports.PartialTypes = keyMirror(['USER', 'CHANNEL', 'GUILD_MEMBER', 'MESSAGE',
|
|||||||
* The type of a WebSocket message event, e.g. `MESSAGE_CREATE`. Here are the available events:
|
* The type of a WebSocket message event, e.g. `MESSAGE_CREATE`. Here are the available events:
|
||||||
* * READY
|
* * READY
|
||||||
* * RESUMED
|
* * RESUMED
|
||||||
* * APPLICATION_COMMAND_CREATE
|
* * APPLICATION_COMMAND_CREATE (deprecated)
|
||||||
* * APPLICATION_COMMAND_DELETE
|
* * APPLICATION_COMMAND_DELETE (deprecated)
|
||||||
* * APPLICATION_COMMAND_UPDATE
|
* * APPLICATION_COMMAND_UPDATE (deprecated)
|
||||||
* * GUILD_CREATE
|
* * GUILD_CREATE
|
||||||
* * GUILD_DELETE
|
* * GUILD_DELETE
|
||||||
* * GUILD_UPDATE
|
* * GUILD_UPDATE
|
||||||
|
|||||||
6
typings/index.d.ts
vendored
6
typings/index.d.ts
vendored
@@ -3556,8 +3556,11 @@ export interface ChannelWebhookCreateOptions {
|
|||||||
export interface ClientEvents {
|
export interface ClientEvents {
|
||||||
apiResponse: [request: APIRequest, response: Response];
|
apiResponse: [request: APIRequest, response: Response];
|
||||||
apiRequest: [request: APIRequest];
|
apiRequest: [request: APIRequest];
|
||||||
|
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
||||||
applicationCommandCreate: [command: ApplicationCommand];
|
applicationCommandCreate: [command: ApplicationCommand];
|
||||||
|
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
||||||
applicationCommandDelete: [command: ApplicationCommand];
|
applicationCommandDelete: [command: ApplicationCommand];
|
||||||
|
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
||||||
applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
|
applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
|
||||||
channelCreate: [channel: GuildChannel];
|
channelCreate: [channel: GuildChannel];
|
||||||
channelDelete: [channel: DMChannel | GuildChannel];
|
channelDelete: [channel: DMChannel | GuildChannel];
|
||||||
@@ -3799,8 +3802,11 @@ export interface ConstantsEvents {
|
|||||||
API_RESPONSE: 'apiResponse';
|
API_RESPONSE: 'apiResponse';
|
||||||
API_REQUEST: 'apiRequest';
|
API_REQUEST: 'apiRequest';
|
||||||
CLIENT_READY: 'ready';
|
CLIENT_READY: 'ready';
|
||||||
|
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
||||||
APPLICATION_COMMAND_CREATE: 'applicationCommandCreate';
|
APPLICATION_COMMAND_CREATE: 'applicationCommandCreate';
|
||||||
|
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
||||||
APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
|
APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
|
||||||
|
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
||||||
APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
|
APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
|
||||||
GUILD_CREATE: 'guildCreate';
|
GUILD_CREATE: 'guildCreate';
|
||||||
GUILD_DELETE: 'guildDelete';
|
GUILD_DELETE: 'guildDelete';
|
||||||
|
|||||||
Reference in New Issue
Block a user