A discord bot that outputs a random quote upon command
- Get a sweet text editor
- Install node.js
Cholatey it: @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
into admin CMD then choco install node.js
Homebrew it: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
then brew install node.js
-
npm install discord.js
-
npm install infinite-loop
-
Clone the project (
git clone https://github.com/EpicDJL/QuoteBot.git
) or download and extract the zip file. -
Edit the config file
-
put the prefix and command of your choice
{
"prefix": "!",
"command": "quote",
(This makes the command !quote) 8. create a bot on https://discordapp.com/developers/applications/me then create a bot account:
- copy the "token" and paste it into the config file
{
"token": "right here :)"
- format the quotes so that they each are a seperate line
quote 1
quote 2
quote 3
(no quotations)
- got to http://textmechanic.com/text-tools/basic-text-tools/add-prefixsuffix-into-line/ and paste your quotes into the text box
- put
"
in the prefix box and",
into the suffix box, this shoud format your quotes like this
"quote 1",
"quote 2",
"quote 3",
- paste it into the quote section in the config file. your config shoould now look like this:
{
"prefix": "prefix",
"command": "command",
"token": "token",
"quotes":["quote 1",
"quote 2",
"quote 3",]
}
now remove the comma from the very last line.
14. create a discord invite by pasting your bot Client Id
into where it says CLIENT_ID_GOES_HERE in this link:
https://discordapp.com/oauth2/authorize?client_id=CLIENT_ID_GOES_HERE&scope=bot&permissions=2097176631
a box should pop up asking you to invite the bot to your discord server. choose which server you want and hit ok
- run
node quote.js
to start the bot, it should output one of the random quotes as sign it is online. - Check your bot by typing the prefix and command you chose into discord.