A very dope bot for the DopeWars discord ;)
- bot
- application.commands
- Manage Channels
- Read Messages/View Channels
- Send Messages
- Send Messages in Threads
- Manage Messages
- Embed Links
- Attach Files
- Add Reactions
- Use Slash Commands
In order for the bot to work correctly, you need to set the following environment variables:
DBOT_CLIENT_TOKEN=
DBOT_TWITTER_BEARER_TOKEN=
DBOT_QX_API_KEY=
DBOT_OS_API_KEY=
DBOT_CLIENT_ID=
DBOT_GUILD_ID=
ENV=test/prod
docker-compose up bot redis
docker-compose up bot
The Api already contains a redis service.
PUBLISH discord '{"id":"your-discord-id","walletaddress":"test","papercount":0,"dopecount":0,"hustlercount":0,"isog":true}'
If your command does not match an existing command type, you can simply create a new commandName.ts
file and drop it into the commands folder. It does not matter where you put it, as long as it is in a sub directory of commands
. Folder names are being ignored, so you can name them as you wish. Events must be dropped into the events
folder.
export default {
data: new SlashCommandBuilder(), /* https://discordjs.guide/interactions/slash-commands.html#options */
async execute(interaction: CommandInteraction): Promise<void> {
try {
await interaction.reply("Guten Morgen!");
} catch(error: unkown) {
return Promise.reject(error);
}
}
}
export default {
name: "eventName", /* https://discordjs.guide/creating-your-bot/event-handling.html#event-handling */
once: true/false, /* The bot logging in is a "once" event, users executing a command is not */
async execute(arg): Promise<void> { /* arg type depends on which event you chose, for e.g. "guildMemberAdd" will pass a "member: GuildMember" */
}
}