Abstract
The default user object
Private
clientIDReadonly
logPrivate
secretGets a channel by id.
Channel id
Channel
Protected
Abstract
initRuns when the bot joins a guild.
Guild
Runs when there is an interaction.
Interaction
Runs after the bot logs in.
Client
Runs when a user leaves.
User
Runs when a message is sent.
Message
Runs when a user joins.
User
Refreshes commands for all servers.
It is recommended to hook this up to a command.
export default class RefreshCommand<TUser, TBot<TUser>> extends Command<TUser, TBot<TUser>> {
public getName() { return "refresh"; }
public create() {
return new SlashCommandBuilder()
.setName(this.getName())
.setDescription("Refresh commands")
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers);
}
public async execute(msg: ChatInputCommandInteraction<CacheType>) {
await msg.deferReply();
await this.bot.refreshCommands();
await msg.editReply("Refreshed commands");
}
}
The heart of your bot. Subclass this to get started.