{"repo":"codesupport/discord-bot","free":true,"listed":false,"github":"https://github.com/codesupport/discord-bot","clone":"git clone https://github.com/codesupport/discord-bot.git","description":"The CodeSupport Discord Bot","language":"TypeScript","stars":22,"topics":["discord","bot","discordjs","hacktoberfest"],"license":"MIT","category":"chat-messaging","readme_excerpt":"CodeSupport Discord Bot About This repository contains the code for the CodeSupport Discord Bot. The project is written in TypeScript using the Discord.js module for interaction with the Discord API. Setup 1. Navigate into the repository on your computer and run npm i 2. Build the source code with npm run build 3. Start the Discord bot with npm start - You will need to supply the DISCORD TOKEN environment variable If you would like to use a .env file for storing your environment variables please create it in the root of the project. If you would like to overwrite values in config.json to better suit your local environment create a file named config.dev.json with any values you would like to overwrite config.json with. Structure - All source code lives inside src/ - All tests live inside test/ - Any static assets (i.e. images) live inside assets/ - Commands live in src/commands/ - Event handlers live in src/event/handlers Please name files (which aren't interfaces) with their type in, for example RuleCommand and RuleCommandTest . This helps make the file names more readable in your editor. Do not add a prefix or suffix of \"I\" or \"Interface\" to interfaces. Creating Commands 1. To create a command, add a new file in src/commands named Command.ts - DiscordX is used to register the commands as slash commands using decorators - Commands should have the @Discord() decorator above the class name 2. The command should have an onInteract async function that is decorated using @Slash() ","default_branch":null,"files":null,"tree":[],"storefront":"/r/codesupport","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/codesupport/discord-bot/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}