|ultimateplayer1999 fcabc328d0||3 days ago|
|commands||3 days ago|
|events||4 days ago|
|handler||4 days ago|
|models||1 month ago|
|views||4 days ago|
|.gitignore||4 weeks ago|
|README.md||4 weeks ago|
|dbinit.js||1 month ago|
|example.env||4 weeks ago|
|index.js||4 days ago|
|package-lock.json||4 days ago|
|package.json||4 days ago|
|readme.md||3 days ago|
A bot that counts that counts how many the letters where used in messages. It also reacts to the messages that have the letters in it.
The configuration is based on a
.env file. See the example.env file for the configuration options.
It is currently only based on the cloud version of mongodb.
This bot is based on shrimpBot. Converted the DB from postgres to mongodb.
Use the following command to initialize the database.
It will create the needed collection and document and return it in the console output.
If you want to run it yourself, use the output of _id for the search and update operation. The following part is needed for this "6448db015eed6ed191ef61a1" (This is offcourse an example, yours will be different.)
commands - This folder contains commands
event - This folder contains files related to discord.js events. (Like "ready", "interactionCreate")
handler - This folder contains files that read the commands folders contents.
models - This folder contains files related to the database models. (Like "wolfcount")
index.js - This is the main file to run the bot.
Create a .env file
cp example.env .env
# BASIC BOT INFO TOKEN=<bottoken> #Mongodb MONGODBUSER=<Username> MONGODBPASS=<Pass> MONGODBCLUSTER=<cluster> DATABASE=<dbname> #Webstuff PORT=<port>
Go to Handler -- > index.js and change "GUIDIDHERE" to your Discord Server's Guild ID for guild only commands.
Go into https://discord.com/developers/applications and enable Privileged Message Intent (If your bot is in more that 100 guilds this requires verification and approval of Discord.).
Run the bot
Want to make this better? Issue a pull request!