

Welcome to
Create-a-Bot!
Below you will find a tutorial on how to get a discord bot up an running.
You will first need to gather the required materials to make everything work.
These are as follows:
► Visual Studio Code (or any other code editor. Notepad++ works to build the code but not to run it.)
► A Heroku Account (to host the bot for free)
► Ability to follow instructions
Create a folder on your computer titled "Bot" to store your bot. Inside this folder create 3 files "api.ts", "config.ts", "index.ts" and another folder titled "commands". In the "commands" folder create a file called "serverinfo.ts".
Go to the [Discord Developer Portal] and click on "New Application" in the top right corner. Then enter a name for your bot and click "Create". Next click "Bot", "Add Bot", & "Yes, do it!". Then you want to locate the Token section on the bot page. You will need this later.
Open "api.ts" with your code editor and type in the code for api.ts from the [Resource].
You can save and close this when done.
Open "config.ts" with your code editor and type in the code for config.ts from the [Resource]. In the "token" space enter in your bot's token from the developer portal. It is important that your token has apostrophes without the brackets. In the "prefix" space put whatever you would like your bots command prefix to be. A common one is [ ! ]. Lastly, go down to the second "commands" section and press enter after the comma. This will take you to a new line. On this new line type [ "serverinfo", ].
You can save and close this when done.
Open "index.ts" with your code editor and type in the code for index.ts from the [Resource].
This is the most important file and what initializes the bots boot up. On the 12th line, replace [Bot] with your bots name.
You can save and close this when done.
Open "serverinfo.ts" with your code editor and type in the code for serverinfo.ts from the [Resource].
You can save and close this when done.
You can also find links to a few guides that I found useful for coding in the [Resource].