Coding Your Own Discord Bot - Discord.js - Creating Custom Commands - *OLD*

preview_player
Показать описание


In this tutorial I teach you how to create your own custom commands for your bot.
-----------------------------------------------------------------------------------------------------------
If you liked the video then please respond with a like and a subscribe to show your support for the channel and I'll repay you by creating more tutorials like this one :)
Рекомендации по теме
Комментарии
Автор

All commands run normally, but they are followed with or preceded by the "unknown command" error. So for example, two scenarios:

1. I roll the dice, but before it rolls it, it gives me an unknown command error. Afterwards, it rolls the dice like normal.
2. I roll the dice, and it works just fine. However, it says unknown command right after.

The same can be applied to the coin flip.

magentas
Автор

For everyone asking how to change the prefix, navigate to Then go to line 28 and replace the "!" with whatever you want your prefix to be.

CoolCatChristi
Автор

That pop up at 3:03 made me chuckle, bravo xd

mattisaderp
Автор

it keeps on telling me that Cannot read property 'registerGroup' of undefined pls help

whyeddy
Автор

Everything works except when I type "!flip" it says "Collection#filterArray: use Collection#filter instead" in VSC.

poploopsoup
Автор

I want the prefix not to be the same, (like / instead of !) How can I do?

hoppy
Автор

Die is singular, dice is plural (sorry it bothered me) Great Tutorials!

RayShooterAP
Автор

I keep having errors, I am not sure how to fix it. it says this:

C:\Users\Neymar
bot.registry.registerGroup('simple', 'Simple');
^

TypeError: Cannot read property 'registerGroup' of undefined
at Object.<anonymous> (C:\Users\Neymar
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3

visualhighmusic
Автор

Everytime I try to use a command it just throws this on the terminal:
TypeError: this.commands.filterArray is not a function

andresvalenzuela
Автор

in Index.js it said that + '/commands') wont work
please help welp

exlimduh
Автор

in index.js for the line "const bot = new Commando.Client();" whenever I try to start up the bot it will not start up and say that commando is undefined

Edit: I found out the true error, its a array problem in the package.json file in discord.js-commando but I still do not know how to fix it

NinjaKiller
Автор

After I write "node ." in terminal it says Ready but does not allow input after doing so. I have to make a new terminal and delete the old one to do it again. Any fix?

landonfellenz
Автор

For using discord.js commando, will it still work if I use [const bot = new Discord.Client();]?

trinitron
Автор

does installing 'npm discord.js - comando ' affect the old commands?

FIRSTMODDED
Автор

Where does it define '!' as the first character you have to use in a command?

tuanduongphan
Автор

i have an error Error: Cannot find module flip'

at
at Function.Module._load
at Function.Module.runMain
at startup
at bootstrapNodeJSCore

JT-flxp
Автор

Great video, but where does it define '!' as the first character you have to use in a command?

thatguy_js
Автор

Can you show how to add timed ban roles next video? Like the command usage would be “!tempban [user] [time] [unit of time]” and this would basically change the user role to a “Banned” role which would limit them

ripdaman
Автор

I think I did everything right. but it says this, when I type node after finishing the !flip cpmmand:
SyntaxError: Unexpected identifier

at new Script (vm.js:83:7)

at createScript (vm.js:267:10)

at Object.runInThisContext (vm.js:319:10)

at Module._compile

at Object.Module._extensions..js

at Module.load

at tryModuleLoad

at Function.Module._load

at Module.require

at require C:\Users\user\Documents\LuX>

SuperSulinka
Автор

I don't understand how to do simple call and response with different variables like !invite 1 sends the first invite, !invite 2 sends the 2nd invite

Daintii