Skip to content
← Back to Community
Node.js Discord Bot Template
Profile icon
almostStatic

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
Voters
Profile icon
KuzoTin
Profile icon
hitakarr
Profile icon
Sat7333333
Profile icon
Wordnony-tutu
Profile icon
CheeseCheese1
Profile icon
DoggeCool
Profile icon
sidmonse
Profile icon
KatherineAndrew
Profile icon
lunispang
Profile icon
ayasense
Comments
hotnewtop
Profile icon
Albxyiscool

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. (/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] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47Hint: hit control+ Help I don't now what am supposed to be doing

Profile icon
[deleted]

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

Profile icon
emanueeloliveir

client.getUserFromMention is not a function Help?

Profile icon
almostStatic

@emanueeloliveir what is your code

Profile icon
zog1

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

Profile icon
almostStatic

@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 🤷

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

Profile icon
zog1

@static2020 keep your hopes up you might win

Profile icon
almostStatic

@zog1 who knows? I guess time will tell

Profile icon
VanillaistOfficial

Why does the bot say whatever you say and how to remove it?

Profile icon
7Hubs

/home/runner/Removed/node_modules/discord.js/src/rest/RESTManager.js:32
const token = this.client.token ?? this.client.accessToken;
^

SyntaxError: Unexpected token '?'

Could someone please help?

Profile icon
emigeniovk

A question how do I make the embed message work?

Profile icon
crack669

how can i modify help without tostring error

Profile icon
almostStatic

I actually ended up winning this!

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

Profile icon
Codemonkey51

Cool!