AbstractThe default user object
Create a bot.
The default user object
Bot secret
Base Discord client with intentions set
ReadonlylogGets a channel by id.
Channel id
Channel
BetaGets a user by its id. This will eventually be renamed to getUser probably.
User id
Protected AbstractinitRuns right before the client logs in.
Runs right before the application quits.
Runs when a user's voice state changes. See discord.js documentation for more information.
Old voice state
New voice state
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");
}
}
Start the bot.
The heart of your bot. Subclass this to get started.