![]() To make things easier, we can use one of the sample git repo as a base: Īdd what we need to its index.js should just work. įor production, we are going to use heroku as the hosting service. We can also ask the command to take parameters, like !play game1, where game1 will be part of commandBody. ![]() Get the client up follow what its welcome doc says is quick, putting their sample code inside index.js would just work: const Discord = require('discord.js') const client = new Discord.Client() client.on('ready', () => Get a local node.js server up, grab Discord.js from npm: npm install discord.js Our use case: listen to command play, create a play space & respond to users in the channel with ready-to-join play space.įor listening & respond part, we will need Discord.js. Now the bot is live and well in a server, let’s see what logic we want and where to host it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |