Skip to main content

EventHandlers

@discordeno/botDocs


Documentation / @discordeno/bot / EventHandlers

Interface: EventHandlers<TProps, TBehavior, TBot>

Type Parameters

TProps extends TransformersDesiredProperties

TBehavior extends DesiredPropertiesBehavior

TBot extends Bot<TProps, TBehavior> = Bot<TProps, TBehavior>

Properties

applicationCommandPermissionsUpdate()

applicationCommandPermissionsUpdate: (command) => unknown

Parameters

command: GuildApplicationCommandPermissions

Returns

unknown

Defined in

packages/bot/src/events.ts:21


automodActionExecution()

automodActionExecution: (payload) => unknown

Parameters

payload: AutoModerationActionExecution

Returns

unknown

Defined in

packages/bot/src/events.ts:26


automodRuleCreate()

automodRuleCreate: (rule) => unknown

Parameters

rule: AutoModerationRule

Returns

unknown

Defined in

packages/bot/src/events.ts:23


automodRuleDelete()

automodRuleDelete: (rule) => unknown

Parameters

rule: AutoModerationRule

Returns

unknown

Defined in

packages/bot/src/events.ts:25


automodRuleUpdate()

automodRuleUpdate: (rule) => unknown

Parameters

rule: AutoModerationRule

Returns

unknown

Defined in

packages/bot/src/events.ts:24


botUpdate()

botUpdate: (user) => unknown

Parameters

user: TBot["transformers"]["$inferredTypes"]["user"]

Returns

unknown

Defined in

packages/bot/src/events.ts:135


channelCreate()

channelCreate: (channel) => unknown

Parameters

channel: TBot["transformers"]["$inferredTypes"]["channel"]

Returns

unknown

Defined in

packages/bot/src/events.ts:112


channelDelete()

channelDelete: (channel) => unknown

Parameters

channel: TBot["transformers"]["$inferredTypes"]["channel"]

Returns

unknown

Defined in

packages/bot/src/events.ts:114


channelPinsUpdate()

channelPinsUpdate: (data) => unknown

Parameters

data

data.channelId: bigint

data.guildId?: bigint

data.lastPinTimestamp?: number

Returns

unknown

Defined in

packages/bot/src/events.ts:115


channelUpdate()

channelUpdate: (channel) => unknown

Parameters

channel: TBot["transformers"]["$inferredTypes"]["channel"]

Returns

unknown

Defined in

packages/bot/src/events.ts:116


debug()

debug: (text, ...args) => unknown

Parameters

text: string

• ...args: any[]

Returns

unknown

Defined in

packages/bot/src/events.ts:20


dispatchRequirements()

dispatchRequirements: (data, shardId) => unknown

Parameters

data: DiscordGatewayPayload

shardId: number

Returns

unknown

Defined in

packages/bot/src/events.ts:113


entitlementCreate()

entitlementCreate: (entitlement) => unknown

Parameters

entitlement: TBot["transformers"]["$inferredTypes"]["entitlement"]

Returns

unknown

Defined in

packages/bot/src/events.ts:143


entitlementDelete()

entitlementDelete: (entitlement) => unknown

Parameters

entitlement: TBot["transformers"]["$inferredTypes"]["entitlement"]

Returns

unknown

Defined in

packages/bot/src/events.ts:145


entitlementUpdate()

entitlementUpdate: (entitlement) => unknown

Parameters

entitlement: TBot["transformers"]["$inferredTypes"]["entitlement"]

Returns

unknown

Defined in

packages/bot/src/events.ts:144


guildAuditLogEntryCreate()

guildAuditLogEntryCreate: (log, guildId) => unknown

Parameters

log: AuditLogEntry

guildId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:22


guildBanAdd()

guildBanAdd: (user, guildId) => unknown

Parameters

user: TBot["transformers"]["$inferredTypes"]["user"]

guildId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:124


guildBanRemove()

guildBanRemove: (user, guildId) => unknown

Parameters

user: TBot["transformers"]["$inferredTypes"]["user"]

guildId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:125


guildCreate()

guildCreate: (guild) => unknown

Parameters

guild: TBot["transformers"]["$inferredTypes"]["guild"]

Returns

unknown

Defined in

packages/bot/src/events.ts:126


guildDelete()

guildDelete: (id, shardId) => unknown

Parameters

id: bigint

shardId: number

Returns

unknown

Defined in

packages/bot/src/events.ts:127


guildEmojisUpdate()

guildEmojisUpdate: (payload) => unknown

Parameters

payload

payload.emojis: Collection<bigint, TBot["transformers"]["$inferredTypes"]["emoji"]>

payload.guildId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:120


guildMemberAdd()

guildMemberAdd: (member, user) => unknown

Parameters

member: TBot["transformers"]["$inferredTypes"]["member"]

user: TBot["transformers"]["$inferredTypes"]["user"]

Returns

unknown

Defined in

packages/bot/src/events.ts:61


guildMemberRemove()

guildMemberRemove: (user, guildId) => unknown

Parameters

user: TBot["transformers"]["$inferredTypes"]["user"]

guildId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:62


guildMemberUpdate()

guildMemberUpdate: (member, user) => unknown

Parameters

member: TBot["transformers"]["$inferredTypes"]["member"]

user: TBot["transformers"]["$inferredTypes"]["user"]

Returns

unknown

Defined in

packages/bot/src/events.ts:63


guildStickersUpdate()

guildStickersUpdate: (payload) => unknown

Parameters

payload

payload.guildId: bigint

payload.stickers: TBot["transformers"]["$inferredTypes"]["sticker"][]

Returns

unknown

Defined in

packages/bot/src/events.ts:64


guildUnavailable()

guildUnavailable: (id, shardId) => unknown

Parameters

id: bigint

shardId: number

Returns

unknown

Defined in

packages/bot/src/events.ts:128


guildUpdate()

guildUpdate: (guild) => unknown

Parameters

guild: TBot["transformers"]["$inferredTypes"]["guild"]

Returns

unknown

Defined in

packages/bot/src/events.ts:129


integrationCreate()

integrationCreate: (integration) => unknown

Parameters

integration: Integration

Returns

unknown

Defined in

packages/bot/src/events.ts:56


integrationDelete()

integrationDelete: (payload) => unknown

Parameters

payload

payload.applicationId?: bigint

payload.guildId: bigint

payload.id: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:57


integrationUpdate()

integrationUpdate: (payload) => unknown

Parameters

payload

payload.guildId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:58


interactionCreate()

interactionCreate: (interaction) => unknown

Parameters

interaction: TBot["transformers"]["$inferredTypes"]["interaction"]

Returns

unknown

Defined in

packages/bot/src/events.ts:55


inviteCreate()

inviteCreate: (invite) => unknown

Parameters

invite: TBot["transformers"]["$inferredTypes"]["invite"]

Returns

unknown

Defined in

packages/bot/src/events.ts:59


inviteDelete()

inviteDelete: (payload) => unknown

Parameters

payload

payload.channelId: bigint

payload.code: string

payload.guildId?: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:60


messageCreate()

messageCreate: (message) => unknown

Parameters

message: TBot["transformers"]["$inferredTypes"]["message"]

Returns

unknown

Defined in

packages/bot/src/events.ts:65


messageDelete()

messageDelete: (payload, message?) => unknown

Parameters

payload

payload.channelId: bigint

payload.guildId?: bigint

payload.id?: bigint

message?: TBot["transformers"]["$inferredTypes"]["message"]

Returns

unknown

Defined in

packages/bot/src/events.ts:66


messageDeleteBulk()

messageDeleteBulk: (payload) => unknown

Parameters

payload

payload.channelId: bigint

payload.guildId?: bigint

payload.ids: bigint[]

Returns

unknown

Defined in

packages/bot/src/events.ts:70


messagePollVoteAdd()

messagePollVoteAdd: (payload) => unknown

Parameters

payload

payload.answerId: number

payload.channelId: bigint

payload.guildId?: bigint

payload.messageId: bigint

payload.userId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:149


messagePollVoteRemove()

messagePollVoteRemove: (payload) => unknown

Parameters

payload

payload.answerId: number

payload.channelId: bigint

payload.guildId?: bigint

payload.messageId: bigint

payload.userId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:150


messageUpdate()

messageUpdate: (message) => unknown

Parameters

message: TBot["transformers"]["$inferredTypes"]["message"]

Returns

unknown

Defined in

packages/bot/src/events.ts:71


presenceUpdate()

presenceUpdate: (presence) => unknown

Parameters

presence: PresenceUpdate

Returns

unknown

Defined in

packages/bot/src/events.ts:99


raw()

raw: (data, shardId) => unknown

Parameters

data: DiscordGatewayPayload

shardId: number

Returns

unknown

Defined in

packages/bot/src/events.ts:130


reactionAdd()

reactionAdd: (payload) => unknown

Parameters

payload

payload.burst: boolean

payload.burstColors?: string[]

payload.channelId: bigint

payload.emoji: TBot["transformers"]["$inferredTypes"]["emoji"]

payload.guildId?: bigint

payload.member?: TBot["transformers"]["$inferredTypes"]["member"]

payload.messageAuthorId?: bigint

payload.messageId: bigint

payload.user?: TBot["transformers"]["$inferredTypes"]["user"]

payload.userId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:72


reactionRemove()

reactionRemove: (payload) => unknown

Parameters

payload

payload.burst: boolean

payload.channelId: bigint

payload.emoji: TBot["transformers"]["$inferredTypes"]["emoji"]

payload.guildId?: bigint

payload.messageId: bigint

payload.userId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:84


reactionRemoveAll()

reactionRemoveAll: (payload) => unknown

Parameters

payload

payload.channelId: bigint

payload.guildId?: bigint

payload.messageId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:98


reactionRemoveEmoji()

reactionRemoveEmoji: (payload) => unknown

Parameters

payload

payload.channelId: bigint

payload.emoji: TBot["transformers"]["$inferredTypes"]["emoji"]

payload.guildId?: bigint

payload.messageId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:92


ready()

ready: (payload, rawPayload) => unknown

Parameters

payload

payload.applicationId: bigint

payload.guilds: bigint[]

payload.sessionId: string

payload.shard?: number[]

payload.shardId: number

payload.user: TBot["transformers"]["$inferredTypes"]["user"]

payload.v: number

rawPayload: DiscordReady

Returns

unknown

Defined in

packages/bot/src/events.ts:43


roleCreate()

roleCreate: (role) => unknown

Parameters

role: TBot["transformers"]["$inferredTypes"]["role"]

Returns

unknown

Defined in

packages/bot/src/events.ts:131


roleDelete()

roleDelete: (payload) => unknown

Parameters

payload

payload.guildId: bigint

payload.roleId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:132


roleUpdate()

roleUpdate: (role) => unknown

Parameters

role: TBot["transformers"]["$inferredTypes"]["role"]

Returns

unknown

Defined in

packages/bot/src/events.ts:133


scheduledEventCreate()

scheduledEventCreate: (event) => unknown

Parameters

event: TBot["transformers"]["$inferredTypes"]["scheduledEvent"]

Returns

unknown

Defined in

packages/bot/src/events.ts:38


scheduledEventDelete()

scheduledEventDelete: (event) => unknown

Parameters

event: TBot["transformers"]["$inferredTypes"]["scheduledEvent"]

Returns

unknown

Defined in

packages/bot/src/events.ts:40


scheduledEventUpdate()

scheduledEventUpdate: (event) => unknown

Parameters

event: TBot["transformers"]["$inferredTypes"]["scheduledEvent"]

Returns

unknown

Defined in

packages/bot/src/events.ts:39


scheduledEventUserAdd()

scheduledEventUserAdd: (payload) => unknown

Parameters

payload

payload.guildId: bigint

payload.guildScheduledEventId: bigint

payload.userId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:41


scheduledEventUserRemove()

scheduledEventUserRemove: (payload) => unknown

Parameters

payload

payload.guildId: bigint

payload.guildScheduledEventId: bigint

payload.userId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:42


soundboardSoundCreate()

soundboardSoundCreate: (payload) => unknown

Parameters

payload: TBot["transformers"]["$inferredTypes"]["soundboardSound"]

Returns

unknown

Defined in

packages/bot/src/events.ts:151


soundboardSoundDelete()

soundboardSoundDelete: (payload) => unknown

Parameters

payload

payload.guildId: bigint

payload.soundId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:153


soundboardSounds()

soundboardSounds: (payload) => unknown

Parameters

payload

payload.guildId: bigint

payload.soundboardSounds: TBot["transformers"]["$inferredTypes"]["soundboardSound"][]

Returns

unknown

Defined in

packages/bot/src/events.ts:155


soundboardSoundsUpdate()

soundboardSoundsUpdate: (payload) => unknown

Parameters

payload

payload.guildId: bigint

payload.soundboardSounds: TBot["transformers"]["$inferredTypes"]["soundboardSound"][]

Returns

unknown

Defined in

packages/bot/src/events.ts:154


soundboardSoundUpdate()

soundboardSoundUpdate: (payload) => unknown

Parameters

payload: TBot["transformers"]["$inferredTypes"]["soundboardSound"]

Returns

unknown

Defined in

packages/bot/src/events.ts:152


stageInstanceCreate()

stageInstanceCreate: (data) => unknown

Parameters

data

data.channelId: bigint

data.guildId: bigint

data.id: bigint

data.topic: string

Returns

unknown

Defined in

packages/bot/src/events.ts:117


stageInstanceDelete()

stageInstanceDelete: (data) => unknown

Parameters

data

data.channelId: bigint

data.guildId: bigint

data.id: bigint

data.topic: string

Returns

unknown

Defined in

packages/bot/src/events.ts:118


stageInstanceUpdate()

stageInstanceUpdate: (data) => unknown

Parameters

data

data.channelId: bigint

data.guildId: bigint

data.id: bigint

data.topic: string

Returns

unknown

Defined in

packages/bot/src/events.ts:119


subscriptionCreate()

subscriptionCreate: (subscription) => unknown

Parameters

subscription: TBot["transformers"]["$inferredTypes"]["subscription"]

Returns

unknown

Defined in

packages/bot/src/events.ts:146


subscriptionDelete()

subscriptionDelete: (subscription) => unknown

Parameters

subscription: TBot["transformers"]["$inferredTypes"]["subscription"]

Returns

unknown

Defined in

packages/bot/src/events.ts:148


subscriptionUpdate()

subscriptionUpdate: (subscription) => unknown

Parameters

subscription: TBot["transformers"]["$inferredTypes"]["subscription"]

Returns

unknown

Defined in

packages/bot/src/events.ts:147


threadCreate()

threadCreate: (thread) => unknown

Parameters

thread: TBot["transformers"]["$inferredTypes"]["channel"]

Returns

unknown

Defined in

packages/bot/src/events.ts:27


threadDelete()

threadDelete: (thread) => unknown

Parameters

thread: TBot["transformers"]["$inferredTypes"]["channel"]

Returns

unknown

Defined in

packages/bot/src/events.ts:28


threadListSync()

threadListSync: (payload) => unknown

Parameters

payload

payload.channelIds?: bigint[]

payload.guildId: bigint

payload.members: ThreadMember[]

payload.threads: TBot["transformers"]["$inferredTypes"]["channel"][]

Returns

unknown

Defined in

packages/bot/src/events.ts:29


threadMembersUpdate()

threadMembersUpdate: (payload) => unknown

Parameters

payload

payload.addedMembers?: ThreadMember[]

payload.guildId: bigint

payload.id: bigint

payload.removedMemberIds?: bigint[]

Returns

unknown

Defined in

packages/bot/src/events.ts:36


threadMemberUpdate()

threadMemberUpdate: (payload) => unknown

Parameters

payload

payload.flags: number

payload.guildId: bigint

payload.id: bigint

payload.joinedAt: number

Returns

unknown

Defined in

packages/bot/src/events.ts:35


threadUpdate()

threadUpdate: (thread) => unknown

Parameters

thread: TBot["transformers"]["$inferredTypes"]["channel"]

Returns

unknown

Defined in

packages/bot/src/events.ts:37


typingStart()

typingStart: (payload) => unknown

Parameters

payload

payload.channelId: bigint

payload.guildId: undefined | bigint

payload.member: undefined | TBot["transformers"]["$inferredTypes"]["member"]

payload.timestamp: number

payload.userId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:136


voiceChannelEffectSend()

voiceChannelEffectSend: (payload) => unknown

Parameters

payload

payload.animationId?: number

payload.animationType?: DiscordVoiceChannelEffectAnimationType

payload.channelId: bigint

payload.emoji?: TBot["transformers"]["$inferredTypes"]["emoji"]

payload.guildId: bigint

payload.soundId?: number | bigint

payload.soundVolume?: number

payload.userId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:100


voiceServerUpdate()

voiceServerUpdate: (payload) => unknown

Parameters

payload

payload.endpoint?: string

payload.guildId: bigint

payload.token: string

Returns

unknown

Defined in

packages/bot/src/events.ts:110


voiceStateUpdate()

voiceStateUpdate: (voiceState) => unknown

Parameters

voiceState: TBot["transformers"]["$inferredTypes"]["voiceState"]

Returns

unknown

Defined in

packages/bot/src/events.ts:111


webhooksUpdate()

webhooksUpdate: (payload) => unknown

Parameters

payload

payload.channelId: bigint

payload.guildId: bigint

Returns

unknown

Defined in

packages/bot/src/events.ts:134