![]() Now we’ve run into another issue, none of our other commands work! This is because were checking the input up front and if it doesn’t match a command registered in our commands array, the bot basically quits. The bot should respond just the same as it did before. Now try and issue the !hello command in your server. exports = // Execute the fn of the prefix object, passing in the message commands ( msg ) We’re going to structure our command file into two parts to be exported the prefix & the function. You guessed it, were going all the way back to the beginning! But trust me, it will be worth it. Create a folder called commands and then a file called hello.js. We’re going to put each command into a separate file to keep things organized. This will provide a clean way to separate our commands into separate files which helps with organization and extending it going forward. ![]() Today we’re going to fix that by setting up the index.js file to scan a directory and import all of our commands for is. All of this with one interesting issue, we’re putting all of our commands into one file in a giant if statement. If you would like to know more about the commands for Dyno and MEE6, visit their websites.Over the past few weeks, we’ve explored a lot of different ways that you can use a Discord Bot and communicate with it, have it communicate back, build interactive commands, etc. This list contains all basic and admin Discord commands, every text formatting command, and some of the commands for the MEE6 and Dyno bots. There are dozens of more commands, but these are the ones you will likely use most frequently.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |