Submit templates for repl.it/templates here.

← Back to all posts
Node.js Discord Bot Template
almostStatic (116)

Hello People

This is a Discord bot starter template I've been working on. Here are some features which it can provide for you:

  • Command Handling
    • Your commands will be in the commands folder.
    • Command Cool downs
    • owner only commands (will be displayed on help command)
    • guild only commands (will be displayed on help command)
    • usage (will be display on help command)
    • description (will be displayed on help command)
  • .env config file
    • prefix
    • token
Comments
hotnewtop
Albxyiscool (1)

Error: There must be a token inside the .env file! Make sure that you have created a .env file and defined the token variable with the correct bot token!
at /home/runner/Nodejs-Discord-Bot-Template/index.js:20:19
at Script.runInContext (vm.js:130:18)
at Object.<anonymous> (/run_dir/interp.js:209:20)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint as runMain
at internal/main/run_main_module.js:17:47Hint: hit control+ Help I don't now what am supposed to be doing

CasperStudioYT (0)

You can just make a file called as .env and paste this inside
token=bot token
prefix=bot prefix
@Albxyiscool

emanueeloliveir (1)

client.getUserFromMention is not a function Help?

zog1 (16)

neat project but this is probably the 3rd discord bot template including the example provided in the announcement post. but still good job

almostStatic (116)

@zog1 I know, I'm not expecting to win :/ Also, I had this as a pre existing repl so it wasn't that much work :shrug:

I just feel that Discord bots are more... templatable

zog1 (16)

@static2020 keep your hopes up you might win

almostStatic (116)

@zog1 who knows? I guess time will tell

emigeniovk (0)

A question how do I make the embed message work?

crack669 (0)

how can i modify help without tostring error

almostStatic (116)

I actually ended up winning this!

Thanks @RossJames for getting me addicted to JS in the first place :D