wtflmao / guess_the_number

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

guess_the_number

Built with Discord.js v14.0.3

Some reference docs can be found here: My Blog

First thing first, git clone this project:

git clone https://github.com/wtflmao/guess_the_number.git

Then, create a config.json in the directory guess_the_number.

  • config.json looks like this:
    {  
       "token": "bot-token-goes-here",  
       "clientId": "bot-clientid-goes-here",  
       "guildId": "serverid-goes-here"  
    }
    • If you don't know what a "bot token" is, then I guess you haven't created your own discord application yet.

      Go to Discord Developer Portal to set up your first very own application and add a very new bot to it.

    • clientId is your bot's snowflake id.

    • guildId is your server's snowflake id.

After setting up that config.json thingy, you should run the following command to install discord.js:

cd guess_the_number
npm install discord.js@v14.0.3

Then, use the following lines to deploy your commands.

node deploy_commands.js

Then ,use the following command to start your bot.

node .

or

node index.js

That's all.

Btw, my bot was built just for myself learning purpose, it isn't production-ready. I do NOT provide any warranty for this project.

About

License:Apache License 2.0


Languages

Language:JavaScript 100.0%