# discord_bot_example **Repository Path**: wtflmao/discord_bot_example ## Basic Information - **Project Name**: discord_bot_example - **Description**: discord_bot_example - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-12-19 - **Last Updated**: 2023-04-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # discord_bot_example Built with [Discord.js v14.9.0](https://discord.js.org/#/docs/discord.js/main/general/welcome) Help and support docs can be found here: [My Blog](https://www.cnblogs.com/hhzm/) To get started, first thing first, git clone this project: ```shell git clone https://github.com/wtflmao/discord_bot_example.git ``` Then, create a config.json in the root directory `discord_bot_example`. - `config.json` looks like this: ```json { "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](https://discord.com/developers/applications) 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: ```shell cd discord_bot_example ``` ```shell npm install discord.js@v14.9.0 ``` Then, use the following command to deploy your commands. ```shell node deploy_commands.js ``` Then, use the following command to start your bot. ```shell node . ``` or ```shell 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.