A plugin to be loaded into the Kommando client.

Hierarchy

  • Plugin

Constructors

Properties

authors: string[]

The author of the plugin.

commands: Collection<string, Command>

The commands will load into the plugin.

config: any

The config provided by the user.

description: string

The description of the plugin.

listeners: {
    applicationCommandPermissionsUpdate?: ((...args: [data: ApplicationCommandPermissionsUpdateData]) => void)[];
    autoModerationActionExecution?: ((...args: [autoModerationActionExecution: AutoModerationActionExecution]) => void)[];
    autoModerationRuleCreate?: ((...args: [autoModerationRule: AutoModerationRule]) => void)[];
    autoModerationRuleDelete?: ((...args: [autoModerationRule: AutoModerationRule]) => void)[];
    autoModerationRuleUpdate?: ((...args: [oldAutoModerationRule: null | AutoModerationRule, newAutoModerationRule: AutoModerationRule]) => void)[];
    cacheSweep?: ((...args: [message: string]) => void)[];
    channelCreate?: ((...args: [channel: NonThreadGuildBasedChannel]) => void)[];
    channelDelete?: ((...args: [channel: DMChannel | NonThreadGuildBasedChannel]) => void)[];
    channelPinsUpdate?: ((...args: [channel: TextBasedChannel, date: Date]) => void)[];
    channelUpdate?: ((...args: [oldChannel: DMChannel | NonThreadGuildBasedChannel, newChannel: DMChannel | NonThreadGuildBasedChannel]) => void)[];
    debug?: ((...args: [message: string]) => void)[];
    emojiCreate?: ((...args: [emoji: GuildEmoji]) => void)[];
    emojiDelete?: ((...args: [emoji: GuildEmoji]) => void)[];
    emojiUpdate?: ((...args: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji]) => void)[];
    error?: ((...args: [error: Error]) => void)[];
    guildAuditLogEntryCreate?: ((...args: [auditLogEntry: GuildAuditLogsEntry<AuditLogEvent, "Update" | "Create" | "Delete", "Guild" | "Channel" | "User" | "Role" | "Invite" | "Webhook" | "Emoji" | "Message" | "Integration" | "StageInstance" | "Sticker" | "GuildScheduledEvent" | "Thread" | "ApplicationCommand" | "AutoModerationRule", AuditLogEvent>, guild: Guild]) => void)[];
    guildBanAdd?: ((...args: [ban: GuildBan]) => void)[];
    guildBanRemove?: ((...args: [ban: GuildBan]) => void)[];
    guildCreate?: ((...args: [guild: Guild]) => void)[];
    guildDelete?: ((...args: [guild: Guild]) => void)[];
    guildIntegrationsUpdate?: ((...args: [guild: Guild]) => void)[];
    guildMemberAdd?: ((...args: [member: GuildMember]) => void)[];
    guildMemberAvailable?: ((...args: [member: GuildMember | PartialGuildMember]) => void)[];
    guildMemberRemove?: ((...args: [member: GuildMember | PartialGuildMember]) => void)[];
    guildMemberUpdate?: ((...args: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember]) => void)[];
    guildMembersChunk?: ((...args: [members: Collection<string, GuildMember>, guild: Guild, data: {
        count: number;
        index: number;
        nonce: undefined | string;
        notFound: unknown[];
    }]) => void)[];
    guildScheduledEventCreate?: ((...args: [guildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>]) => void)[];
    guildScheduledEventDelete?: ((...args: [guildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>]) => void)[];
    guildScheduledEventUpdate?: ((...args: [oldGuildScheduledEvent: null | GuildScheduledEvent<GuildScheduledEventStatus>, newGuildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>]) => void)[];
    guildScheduledEventUserAdd?: ((...args: [guildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>, user: User]) => void)[];
    guildScheduledEventUserRemove?: ((...args: [guildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>, user: User]) => void)[];
    guildUnavailable?: ((...args: [guild: Guild]) => void)[];
    guildUpdate?: ((...args: [oldGuild: Guild, newGuild: Guild]) => void)[];
    interactionCreate?: ((...args: [interaction: Interaction<CacheType>]) => void)[];
    invalidated?: ((...args: []) => void)[];
    inviteCreate?: ((...args: [invite: Invite]) => void)[];
    inviteDelete?: ((...args: [invite: Invite]) => void)[];
    messageCreate?: ((...args: [message: Message<boolean>]) => void)[];
    messageDelete?: ((...args: [message: Message<boolean> | PartialMessage]) => void)[];
    messageDeleteBulk?: ((...args: [messages: Collection<string, Message<boolean> | PartialMessage>, channel: GuildTextBasedChannel]) => void)[];
    messageReactionAdd?: ((...args: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser]) => void)[];
    messageReactionRemove?: ((...args: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser]) => void)[];
    messageReactionRemoveAll?: ((...args: [message: Message<boolean> | PartialMessage, reactions: Collection<string, MessageReaction>]) => void)[];
    messageReactionRemoveEmoji?: ((...args: [reaction: MessageReaction | PartialMessageReaction]) => void)[];
    messageUpdate?: ((...args: [oldMessage: Message<boolean> | PartialMessage, newMessage: Message<boolean> | PartialMessage]) => void)[];
    presenceUpdate?: ((...args: [oldPresence: null | Presence, newPresence: Presence]) => void)[];
    ready?: ((...args: [client: Client<true>]) => void)[];
    roleCreate?: ((...args: [role: Role]) => void)[];
    roleDelete?: ((...args: [role: Role]) => void)[];
    roleUpdate?: ((...args: [oldRole: Role, newRole: Role]) => void)[];
    shardDisconnect?: ((...args: [closeEvent: CloseEvent, shardId: number]) => void)[];
    shardError?: ((...args: [error: Error, shardId: number]) => void)[];
    shardReady?: ((...args: [shardId: number, unavailableGuilds: Set<string>]) => void)[];
    shardReconnecting?: ((...args: [shardId: number]) => void)[];
    shardResume?: ((...args: [shardId: number, replayedEvents: number]) => void)[];
    stageInstanceCreate?: ((...args: [stageInstance: StageInstance]) => void)[];
    stageInstanceDelete?: ((...args: [stageInstance: StageInstance]) => void)[];
    stageInstanceUpdate?: ((...args: [oldStageInstance: null | StageInstance, newStageInstance: StageInstance]) => void)[];
    stickerCreate?: ((...args: [sticker: Sticker]) => void)[];
    stickerDelete?: ((...args: [sticker: Sticker]) => void)[];
    stickerUpdate?: ((...args: [oldSticker: Sticker, newSticker: Sticker]) => void)[];
    threadCreate?: ((...args: [thread: AnyThreadChannel<boolean>, newlyCreated: boolean]) => void)[];
    threadDelete?: ((...args: [thread: AnyThreadChannel<boolean>]) => void)[];
    threadListSync?: ((...args: [threads: Collection<string, AnyThreadChannel<boolean>>, guild: Guild]) => void)[];
    threadMemberUpdate?: ((...args: [oldMember: ThreadMember<boolean>, newMember: ThreadMember<boolean>]) => void)[];
    threadMembersUpdate?: ((...args: [addedMembers: Collection<string, ThreadMember<boolean>>, removedMembers: Collection<string, ThreadMember<boolean> | PartialThreadMember>, thread: AnyThreadChannel<boolean>]) => void)[];
    threadUpdate?: ((...args: [oldThread: AnyThreadChannel<boolean>, newThread: AnyThreadChannel<boolean>]) => void)[];
    typingStart?: ((...args: [typing: Typing]) => void)[];
    userUpdate?: ((...args: [oldUser: User | PartialUser, newUser: User]) => void)[];
    voiceStateUpdate?: ((...args: [oldState: VoiceState, newState: VoiceState]) => void)[];
    warn?: ((...args: [message: string]) => void)[];
    webhookUpdate?: ((...args: [channel: NewsChannel | TextChannel | VoiceChannel | ForumChannel]) => void)[];
}

The events will load into the plugin.

Type declaration

  • Optional applicationCommandPermissionsUpdate?: ((...args: [data: ApplicationCommandPermissionsUpdateData]) => void)[]
  • Optional autoModerationActionExecution?: ((...args: [autoModerationActionExecution: AutoModerationActionExecution]) => void)[]
  • Optional autoModerationRuleCreate?: ((...args: [autoModerationRule: AutoModerationRule]) => void)[]
  • Optional autoModerationRuleDelete?: ((...args: [autoModerationRule: AutoModerationRule]) => void)[]
  • Optional autoModerationRuleUpdate?: ((...args: [oldAutoModerationRule: null | AutoModerationRule, newAutoModerationRule: AutoModerationRule]) => void)[]
  • Optional cacheSweep?: ((...args: [message: string]) => void)[]
  • Optional channelCreate?: ((...args: [channel: NonThreadGuildBasedChannel]) => void)[]
  • Optional channelDelete?: ((...args: [channel: DMChannel | NonThreadGuildBasedChannel]) => void)[]
  • Optional channelPinsUpdate?: ((...args: [channel: TextBasedChannel, date: Date]) => void)[]
  • Optional channelUpdate?: ((...args: [oldChannel: DMChannel | NonThreadGuildBasedChannel, newChannel: DMChannel | NonThreadGuildBasedChannel]) => void)[]
  • Optional debug?: ((...args: [message: string]) => void)[]
  • Optional emojiCreate?: ((...args: [emoji: GuildEmoji]) => void)[]
  • Optional emojiDelete?: ((...args: [emoji: GuildEmoji]) => void)[]
  • Optional emojiUpdate?: ((...args: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji]) => void)[]
  • Optional error?: ((...args: [error: Error]) => void)[]
  • Optional guildAuditLogEntryCreate?: ((...args: [auditLogEntry: GuildAuditLogsEntry<AuditLogEvent, "Update" | "Create" | "Delete", "Guild" | "Channel" | "User" | "Role" | "Invite" | "Webhook" | "Emoji" | "Message" | "Integration" | "StageInstance" | "Sticker" | "GuildScheduledEvent" | "Thread" | "ApplicationCommand" | "AutoModerationRule", AuditLogEvent>, guild: Guild]) => void)[]
  • Optional guildBanAdd?: ((...args: [ban: GuildBan]) => void)[]
  • Optional guildBanRemove?: ((...args: [ban: GuildBan]) => void)[]
  • Optional guildCreate?: ((...args: [guild: Guild]) => void)[]
  • Optional guildDelete?: ((...args: [guild: Guild]) => void)[]
  • Optional guildIntegrationsUpdate?: ((...args: [guild: Guild]) => void)[]
  • Optional guildMemberAdd?: ((...args: [member: GuildMember]) => void)[]
  • Optional guildMemberAvailable?: ((...args: [member: GuildMember | PartialGuildMember]) => void)[]
  • Optional guildMemberRemove?: ((...args: [member: GuildMember | PartialGuildMember]) => void)[]
  • Optional guildMemberUpdate?: ((...args: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember]) => void)[]
  • Optional guildMembersChunk?: ((...args: [members: Collection<string, GuildMember>, guild: Guild, data: {
        count: number;
        index: number;
        nonce: undefined | string;
        notFound: unknown[];
    }]) => void)[]
  • Optional guildScheduledEventCreate?: ((...args: [guildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>]) => void)[]
  • Optional guildScheduledEventDelete?: ((...args: [guildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>]) => void)[]
  • Optional guildScheduledEventUpdate?: ((...args: [oldGuildScheduledEvent: null | GuildScheduledEvent<GuildScheduledEventStatus>, newGuildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>]) => void)[]
  • Optional guildScheduledEventUserAdd?: ((...args: [guildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>, user: User]) => void)[]
  • Optional guildScheduledEventUserRemove?: ((...args: [guildScheduledEvent: GuildScheduledEvent<GuildScheduledEventStatus>, user: User]) => void)[]
  • Optional guildUnavailable?: ((...args: [guild: Guild]) => void)[]
  • Optional guildUpdate?: ((...args: [oldGuild: Guild, newGuild: Guild]) => void)[]
  • Optional interactionCreate?: ((...args: [interaction: Interaction<CacheType>]) => void)[]
  • Optional invalidated?: ((...args: []) => void)[]
  • Optional inviteCreate?: ((...args: [invite: Invite]) => void)[]
  • Optional inviteDelete?: ((...args: [invite: Invite]) => void)[]
  • Optional messageCreate?: ((...args: [message: Message<boolean>]) => void)[]
  • Optional messageDelete?: ((...args: [message: Message<boolean> | PartialMessage]) => void)[]
  • Optional messageDeleteBulk?: ((...args: [messages: Collection<string, Message<boolean> | PartialMessage>, channel: GuildTextBasedChannel]) => void)[]
  • Optional messageReactionAdd?: ((...args: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser]) => void)[]
  • Optional messageReactionRemove?: ((...args: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser]) => void)[]
  • Optional messageReactionRemoveAll?: ((...args: [message: Message<boolean> | PartialMessage, reactions: Collection<string, MessageReaction>]) => void)[]
  • Optional messageReactionRemoveEmoji?: ((...args: [reaction: MessageReaction | PartialMessageReaction]) => void)[]
  • Optional messageUpdate?: ((...args: [oldMessage: Message<boolean> | PartialMessage, newMessage: Message<boolean> | PartialMessage]) => void)[]
  • Optional presenceUpdate?: ((...args: [oldPresence: null | Presence, newPresence: Presence]) => void)[]
  • Optional ready?: ((...args: [client: Client<true>]) => void)[]
  • Optional roleCreate?: ((...args: [role: Role]) => void)[]
  • Optional roleDelete?: ((...args: [role: Role]) => void)[]
  • Optional roleUpdate?: ((...args: [oldRole: Role, newRole: Role]) => void)[]
  • Optional shardDisconnect?: ((...args: [closeEvent: CloseEvent, shardId: number]) => void)[]
  • Optional shardError?: ((...args: [error: Error, shardId: number]) => void)[]
  • Optional shardReady?: ((...args: [shardId: number, unavailableGuilds: Set<string>]) => void)[]
  • Optional shardReconnecting?: ((...args: [shardId: number]) => void)[]
  • Optional shardResume?: ((...args: [shardId: number, replayedEvents: number]) => void)[]
  • Optional stageInstanceCreate?: ((...args: [stageInstance: StageInstance]) => void)[]
  • Optional stageInstanceDelete?: ((...args: [stageInstance: StageInstance]) => void)[]
  • Optional stageInstanceUpdate?: ((...args: [oldStageInstance: null | StageInstance, newStageInstance: StageInstance]) => void)[]
  • Optional stickerCreate?: ((...args: [sticker: Sticker]) => void)[]
  • Optional stickerDelete?: ((...args: [sticker: Sticker]) => void)[]
  • Optional stickerUpdate?: ((...args: [oldSticker: Sticker, newSticker: Sticker]) => void)[]
  • Optional threadCreate?: ((...args: [thread: AnyThreadChannel<boolean>, newlyCreated: boolean]) => void)[]
  • Optional threadDelete?: ((...args: [thread: AnyThreadChannel<boolean>]) => void)[]
  • Optional threadListSync?: ((...args: [threads: Collection<string, AnyThreadChannel<boolean>>, guild: Guild]) => void)[]
  • Optional threadMemberUpdate?: ((...args: [oldMember: ThreadMember<boolean>, newMember: ThreadMember<boolean>]) => void)[]
  • Optional threadMembersUpdate?: ((...args: [addedMembers: Collection<string, ThreadMember<boolean>>, removedMembers: Collection<string, ThreadMember<boolean> | PartialThreadMember>, thread: AnyThreadChannel<boolean>]) => void)[]
  • Optional threadUpdate?: ((...args: [oldThread: AnyThreadChannel<boolean>, newThread: AnyThreadChannel<boolean>]) => void)[]
  • Optional typingStart?: ((...args: [typing: Typing]) => void)[]
  • Optional userUpdate?: ((...args: [oldUser: User | PartialUser, newUser: User]) => void)[]
  • Optional voiceStateUpdate?: ((...args: [oldState: VoiceState, newState: VoiceState]) => void)[]
  • Optional warn?: ((...args: [message: string]) => void)[]
  • Optional webhookUpdate?: ((...args: [channel: NewsChannel | TextChannel | VoiceChannel | ForumChannel]) => void)[]
name: string

The name of the plugin.

version: string

The version of the plugin.

Methods

  • Emits an event.

    Type Parameters

    • K extends keyof ClientEvents

    Parameters

    • event: K

      The event to emit.

    • Rest ...args: ClientEvents[K]

      The arguments to pass to the event.

    Returns void

  • Adds a listener to the plugin.

    Type Parameters

    • K extends keyof ClientEvents

    Parameters

    • event: K

      The event to listen to.

    • listener: ((...args: ClientEvents[K]) => void)

      The listener to add.

        • (...args: ClientEvents[K]): void
        • Parameters

          • Rest ...args: ClientEvents[K]

          Returns void

    Returns void

Generated using TypeDoc