Ask coding questions

← Back to all posts
can you give me these codes?
joseluiz23 (0)

I'm in doubt in code for 3 commands, the lock / warn / mute code. Can you give me some of these codes please? (I'm from Brazil, sorry if I have errors up there and here too)

Comments
hotnewtop
RYANTADIPARTHI (6017)

Are you asking for code? If so, uh, you have a huge error before anything can be implemented.

YodaCode (116)

The error you're having is an invalid token. Try going to the Discord developer page and generating a new token. Here's the error I got when running your repl:

Promise {
  <rejected> Error [TOKEN_INVALID]: An invalid token was provided.
      at Client.login (/home/runner/amtlej8k5ua/node_modules/discord.js/src/client/Client.js:206:52)
      at /home/runner/amtlej8k5ua/index.js:36:8
      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] (internal/modules/run_main.js:71:12)
      at internal/main/run_main_module.js:17:47 {
    [Symbol(code)]: 'TOKEN_INVALID'
  }
}
Hint: hit control+c anytime to enter REPL.
(node:42) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided.
    at Client.login (/home/runner/amtlej8k5ua/node_modules/discord.js/src/client/Client.js:206:52)
    at /home/runner/amtlej8k5ua/index.js:36:8
    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] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
(node:42) UnhandledPromiseRejectionWarning: Unhandled promise rejection.
Coder100 (18097)

um we can't run discord bots remember? @YodaCode