This repo is meant as a template which you can use to create a Discord bot very easily using the Discordeno library.
Use this template
This is a template repo.git clone url-here-for-your-repo
configs.ts
file in the main folder.// Step 1: Remove the `.example` from this file name so it is called `configs.ts`
// Step 2: Add all your bot's information below. The only required one is token and prefix. NOTE: As long as `.gitignore` file is ignoring configs.ts your configurations will be kept private!
// Step 3: Remove these comments if you like.
export const configs = {
// Your bot token goes here
token: "",
// The default prefix for your bot. Don't worry guilds can change this later.
prefix: "!",
// This isn't required but you can add bot list api keys here.
botListTokens: {
DISCORD_BOT_ORG: "",
BOTS_ON_DISCORD: "",
DISCORD_BOT_LIST: "",
BOTS_FOR_DISCORD: "",
DISCORD_BOATS: "",
DISCORD_BOTS_GG: "",
DISCORD_BOTS_GROUP: "",
},
// This is the server id for your bot's main server where users can get help/support
supportServerID: "",
// These are channel ids that will enable some functionality
channelIDs: {
// When a translation is missing this is the channel you will be alerted in.
missingTranslation: "",
// When an error occurs, we will try and log it to this channel
errorChannelID: "",
},
// These are the role ids that will enable some functionality.
roleIDs: {
// If you have a patreon set up you can add the patreon vip role id here.
patreonVIPRoleID: "",
},
// These are the user ids that will enable some functionality.
userIDs: {
// You can delete the `as string[]` when you add atleast 1 id in them.
// The user ids for the support team
botSupporters: [] as string[],
// The user ids for the other devs on your team
botDevs: [] as string[],
// The user ids who have complete 100% access to your bot
botOwners: [] as string[],
},
};
deno run --allow-net --allow-read mod.ts
Note: To run the bot with PM2
: pm2 start mod.ts --interpreter="deno" --interpreter-args="run --allow-net --allow-read -r"
The -r
is short for --reload
, it reloads your deno cache whenever the bot restarts to get the latest and greatest changes to Discordeno. You don’t have to include it.
Don’t worry a lot of developers start out coding their first projects as a Discord bot(I did 😉) and it is not so easy. With Discordeno, I tried to build it in a way that solved all the headaches I had when first starting out coding bots. If you are a beginner developer, please use this boilerplate.
Modular commands, arguments, events, inhibitors, monitors, tasks.
Hot Reloadable
Step By Step Guide
Author: Skillz4Killz
Demo: https://discord.com/invite/J4NqJ72
Source Code: https://github.com/Skillz4Killz/Discordeno-bot-template
#deno #nodejs #node #javascript