Respository for a bot that counts how many times the word has been said and reacts to every message with the letters in it.
Go to file
ultimateplayer1999 fcabc328d0 minor readme update 2023-05-25 11:07:07 +00:00
commands Wolfcount description and readme update 2023-05-25 11:02:23 +00:00
events update 2023-05-24 08:31:35 +00:00
handler update 2023-05-24 08:31:35 +00:00
models Added spacing and presence 2023-04-26 09:32:56 +00:00
views update 2023-05-24 08:31:35 +00:00
.gitignore Changed template 2023-04-28 11:48:43 +00:00
README.md Changed template 2023-04-28 11:48:43 +00:00
dbinit.js Added spacing and presence 2023-04-26 09:32:56 +00:00
example.env Moved webport to .env file 2023-05-03 09:46:14 +00:00
index.js update 2023-05-24 08:31:35 +00:00
package-lock.json update 2023-05-24 08:31:35 +00:00
package.json update 2023-05-24 08:31:35 +00:00
readme.md minor readme update 2023-05-25 11:07:07 +00:00

readme.md

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. node dbinit.js 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.)

Structure:

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.

  1. Use npm i

  2. Create a .env file touch .env or cp example.env .env

  3. Edit .env

# BASIC BOT INFO
TOKEN=<bottoken>

#Mongodb
MONGODBUSER=<Username>
MONGODBPASS=<Pass>
MONGODBCLUSTER=<cluster>
DATABASE=<dbname>

#Webstuff
PORT=<port>
  1. Go to Handler -- > index.js and change "GUIDIDHERE" to your Discord Server's Guild ID for guild only commands.

  2. 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.).

  3. Run the bot node index.js

Want to make this better? Issue a pull request!