Submit templates for repl.it/templates here.

← Back to all posts
Node.js Discord Bot Template
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
lunispang
ayasense
DxrkBoris
WinDogeFromFrom
DotieTheDot
SilentShadowBla
PixelNinja
tomasruiz123
frissyn
Kai_Justice
Comments
hotnewtop
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.<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

[deleted]

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

emanueeloliveir

client.getUserFromMention is not a function Help?

almostStatic

@emanueeloliveir what is your code

zog1

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

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 :shrug:

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

zog1

@static2020 keep your hopes up you might win

almostStatic

@zog1 who knows? I guess time will tell

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?

emigeniovk

A question how do I make the embed message work?

crack669

how can i modify help without tostring error

almostStatic

I actually ended up winning this!

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

Codemonkey51

Cool!