Citra bot for Discord
 
 
 
 
Go to file
SleepingSnakezzz dcf8b0efbe
Update leaked games rule.json
2023-12-03 14:23:26 +01:00
.github/workflows CI: use Node.js 20 for TypeScript checking 2023-09-07 18:06:12 -06:00
src Update leaked games rule.json 2023-12-03 14:23:26 +01:00
typings typings: add third-party typings for logdna-winston 2023-06-26 17:36:30 -06:00
.dockerignore Added Docker support. 2017-09-24 15:44:49 -04:00
.eslintrc.json tree-wide: update to Node.js 18 LTS 2022-12-31 02:05:32 -07:00
.gitignore tree-wide: use rollup to bundle 2022-09-14 03:05:51 -06:00
Dockerfile Upgrade to Node.js 20 ... 2023-08-23 10:45:51 -06:00
LICENSE Initial commit 2016-12-07 22:27:08 -05:00
README.md multiple changes... 2020-07-26 21:54:03 -06:00
bundle.sh rollup: try to bundle Discord.js as well 2022-09-16 18:04:28 -06:00
env.json commands/grantTester: new command 2023-04-28 14:41:45 +02:00
generateExports.js tree-wide: await all the await-able functions 2022-11-18 20:56:38 -07:00
package.json deps: update dependencies 2023-11-29 12:12:52 -07:00
tsconfig.json tsconfig: update to match Node.js 20 preset 2023-09-07 18:04:24 -06:00
yarn.lock deps: update dependencies 2023-11-29 12:12:52 -07:00

README.md

Setting Up Discord

Create server in Discord.

Create text channel for logs.

Create roles Admins and Moderators.

Invite Bot to your Server (see Creating a Bot User below).

Make bot a Moderator.

Install & Dependencies

Install Node.js and Yarn.

Install forever (task scheduler).

yarn global add forever

Clone repository and install package dependencies.

git clone https://github.com/citra-emu/discord-bot.git
cd discord-bot
yarn

Create new JSON file for bot config with the following contents in the directory specified below:

For Development: ./config/development.json

For Production: ./config/production.json

{
  "logChannel": "",
  "clientLoginToken": ""
} 

To get logChannel, type \#YOUR_CHANNEL_NAME in your Discord server chat.

Copy string of numbers after # into "logChannel": ""

Copy App Bot User token to "clientLoginToken": ""

Running Bot

For Production

First yo need to build the project by running yarn build.

./start.sh Requires a config/production.json file.

For Development

yarn serve Requires a config/development.json file.

License

GNU General Public License v2.0

Creating a Bot User.

First you need to go to discord developers and click "New Application" Application Screen Now give your bot a name and a picture, a description isn't necessary. New Application Screen Click "Create Application". On the next page scroll down until you see "Create a bot user", click that. Also click yes do it. Screen you see after creating a new application then scrolling down a little. Yes Do It. Now you can get your bot's token, by using the "click to reveal button" in the app bot user section. Remember to uncheck Public Bot New Bot Page Token There's your token! Now its time to invite your bot to your server. Don't worry about your bot being started for this next step. Change the client_id in the URL to your Client ID under App Details, then go to this url https://discordapp.com/oauth2/authorize?&client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=0 Authorize Bot Now select your sever, then click authorize. Authorized That's it! Now you can start your bot.