mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
Add inviteDelete event
This commit is contained in:
parent
24ed499800
commit
bbb3d739dc
@ -31,7 +31,8 @@ import type {
|
|||||||
DiscordTypingStart,
|
DiscordTypingStart,
|
||||||
DiscordUser,
|
DiscordUser,
|
||||||
DiscordWebhookUpdate,
|
DiscordWebhookUpdate,
|
||||||
DiscordInviteCreate
|
DiscordInviteCreate,
|
||||||
|
DiscordInviteDelete
|
||||||
} from "../discordeno/mod.ts";
|
} from "../discordeno/mod.ts";
|
||||||
|
|
||||||
import type { Snowflake } from "./Snowflake.ts";
|
import type { Snowflake } from "./Snowflake.ts";
|
||||||
@ -281,6 +282,10 @@ export const INVITE_CREATE: RawHandler<DiscordInviteCreate> = (session, _shardId
|
|||||||
session.emit("inviteCreate", NewInviteCreate(session, invite));
|
session.emit("inviteCreate", NewInviteCreate(session, invite));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const INVITE_DELETE: RawHandler<DiscordInviteDelete> = (session, _shardId, data) => {
|
||||||
|
session.emit("inviteDelete", { channelId: data.channel_id, guildId: data.guild_id, code: data.code });
|
||||||
|
}
|
||||||
|
|
||||||
export const raw: RawHandler<unknown> = (session, shardId, data) => {
|
export const raw: RawHandler<unknown> = (session, shardId, data) => {
|
||||||
session.emit("raw", data, shardId);
|
session.emit("raw", data, shardId);
|
||||||
};
|
};
|
||||||
@ -327,6 +332,7 @@ export interface Events {
|
|||||||
"integrationUpdate": Handler<[Integration]>;
|
"integrationUpdate": Handler<[Integration]>;
|
||||||
"integrationDelete": Handler<[{ id: Snowflake, guildId?: Snowflake, applicationId?: Snowflake }]>;
|
"integrationDelete": Handler<[{ id: Snowflake, guildId?: Snowflake, applicationId?: Snowflake }]>;
|
||||||
"inviteCreate": Handler<[InviteCreate]>;
|
"inviteCreate": Handler<[InviteCreate]>;
|
||||||
|
"inviteDelete": Handler<[{ channelId: string, guildId?: string, code: string }]>;
|
||||||
"autoModerationRuleCreate": Handler<[AutoModerationRule]>;
|
"autoModerationRuleCreate": Handler<[AutoModerationRule]>;
|
||||||
"autoModerationRuleUpdate": Handler<[AutoModerationRule]>;
|
"autoModerationRuleUpdate": Handler<[AutoModerationRule]>;
|
||||||
"autoModerationRuleDelete": Handler<[AutoModerationRule]>;
|
"autoModerationRuleDelete": Handler<[AutoModerationRule]>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user