A simple Discord bot that stores and returns URLs and text to a user's Discord channel
- Click the
oauth2link underneath and select the server you wish to invite the bot to https://discordapp.com/oauth2/authorize?client_id=624364418737766410&scope=bot - Run the command
$mkcolto establish a database collection - Use the bot to your will
Using the prefix '$':
mkcol: initializes collection for the serverid, and is required to existrmcol: deletes the serverid collection from databaseadd [title] [text]: adds entry into the collectionrm [title]: removes entry from collectionls [page number]: returns entries in blocks of 15grep [text]: returns entries that contain textsid: returns the server's idhelp: returns list of commmands
- node.js v.^10
- discord.js v.^11
- dotenv v.^8
- mongodb v.^3
-
Install node.js latest stable release
-
For macOS, check if node exists by running
node -v -
If node does not exist :
- Go to nodejs.org and download the latest version
-
If node exists :
- Update node by
npm i -g npmorsudo npm i -g npm
- Update node by
-
Create a dedicated project folder with
mkdir 'project-name'and then cd into it -
Run
npm initand ignore thepackage.jsonand questions if confused -
Run
npm install discord.js
- Initially only ran locally with
node index.js - Currently hosted on heroku to run 24/7