Nods and Nod Accessories.
Go to file
2023-08-06 14:37:17 -07:00
.github/workflows Shouldn't be pushing to main 2023-08-06 09:14:44 -04:00
dot-commands Fix deletable message bug 2023-02-12 21:22:21 -05:00
slash-commands Restructure /save commands 2023-08-06 17:29:17 -04:00
_clear-commands.js Move One Time Scripts back to root 2022-06-10 22:27:44 -04:00
_deploy-commands.js Move One Time Scripts back to root 2022-06-10 22:27:44 -04:00
_deploy-global.js fixed file name and fixed it to run properly 2022-06-20 19:00:18 -04:00
.dockerignore ignore .env 2022-06-10 23:02:27 -04:00
.DS_Store Sanitize inputs 2022-06-01 13:09:16 -04:00
.eslintrc.json Initial commit 2021-09-22 12:10:52 -04:00
.gitignore Ignore all .env 2023-08-06 08:47:15 -04:00
config.json Update to work with Nodbot server 2022-06-10 22:28:12 -04:00
Dockerfile Restructure CMD 2023-02-12 21:17:14 -05:00
functions.js Forgot to toggle 2023-08-06 09:04:24 -04:00
main.js Add variety to ong 2023-04-13 20:16:33 -04:00
package.json Restructure /save commands 2023-08-06 17:29:17 -04:00
README.md Versioning 2023-01-07 20:32:38 -05:00
Roadmap.md Documentation 2022-06-03 10:07:24 -04:00
strings.json Adding costs to embeds 2023-05-31 08:07:12 -04:00

About Nodbot

Nodbot is a content saving and serving Discord bot. Nodbot is able to search Tenor for GIFs, save custom copypastas, and look up marijuana strain information. Nodbot is in semi-active development by voidf1sh. It's buggy as hell and very shoddily built. Don't use it.

Nodbot Help

Use the /help command to see the bot's help message.

Create Docker Image

docker build --tag=name/nodbot .

Push Docker Image

docker push name/nodbot

Immediate To-Do

  1. Sanitize inputs for SQL queries. Done.
  2. Move environment variables so they don't get included in the image.
  3. Implement error handling on all actions.
  4. Ephemeral responses to some/most slash commands.
  5. Comment the code! Document!
  6. Check for and create database tables if necessary. Handle errors.

Deploy NodBot Yourself

  1. Create an application at the Discord Developer Portal
  2. Convert the application into a Bot
  3. Note down the token provided and keep this safe. You cannot view this token again, only regenerate a new one.
  4. Create a Tenor account and obtain an API key.
  5. Install and configure MySQL or MariaDB with a user for the bot and a datbase
  • Create the table structure as outlined below (* Nodbot will soon create its own table structure)
  1. Configure your environment variables as outlined below.
  2. Fire it up with node main.js

Table Structure

Table: gifs
+-----------+---------------+------+-----+---------+----------------+
| Field     | Type          | Null | Key | Default | Extra          |
+-----------+---------------+------+-----+---------+----------------+
| id        | int(11)       | NO   | MUL | NULL    | auto_increment |
| name      | varchar(100)  | NO   |     | NULL    |                |
| embed_url | varchar(1000) | NO   |     | NULL    |                |
+-----------+---------------+------+-----+---------+----------------+

Table: joints
+---------+---------------+------+-----+---------+----------------+
| Field   | Type          | Null | Key | Default | Extra          |
+---------+---------------+------+-----+---------+----------------+
| id      | int(11)       | NO   | MUL | NULL    | auto_increment |
| content | varchar(1000) | NO   |     | NULL    |                |
+---------+---------------+------+-----+---------+----------------+

Table: pastas
+---------+---------------+------+-----+---------+----------------+
| Field   | Type          | Null | Key | Default | Extra          |
+---------+---------------+------+-----+---------+----------------+
| id      | int(11)       | NO   | MUL | NULL    | auto_increment |
| name    | varchar(100)  | NO   |     | NULL    |                |
| content | varchar(1900) | NO   |     | NULL    |                |
| iconurl | varchar(200)  | NO   |     | (url)   |                |
+---------+---------------+------+-----+---------+----------------+

Table: requests
+---------+---------------+------+-----+---------+----------------+
| Field   | Type          | Null | Key | Default | Extra          |
+---------+---------------+------+-----+---------+----------------+
| id      | int(11)       | NO   | MUL | NULL    | auto_increment |
| author  | varchar(100)  | NO   |     | NULL    |                |
| request | varchar(1000) | NO   |     | NULL    |                |
| status  | varchar(10)   | YES  |     | Active  |                |
+---------+---------------+------+-----+---------+----------------+

Table: strains
+---------+-------------+------+-----+---------+-------+
| Field   | Type        | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| id      | smallint(6) | NO   |     | NULL    |       |
| name    | varchar(60) | YES  |     | NULL    |       |
| type    | varchar(10) | YES  |     | NULL    |       |
| effects | varchar(80) | YES  |     | NULL    |       |
| ailment | varchar(70) | YES  |     | NULL    |       |
| flavor  | varchar(30) | YES  |     | NULL    |       |
+---------+-------------+------+-----+---------+-------+

Environment Variables

TOKEN=<your bot's token from step 3>
isDev=<true/false>
dbHost=<mySQL host>
dbPort=<mySQL port (3306)>
dbUser=<mySQL username>
dbPass=<mySQL user password>
dbName=<mySQL table name>
tenorAPIKey=<Tenor API Key>
ownerId=<your Discord user ID>
statusChannelId=<Discord channel ID of channel used for status messages>
clientId=<Discord user ID of your bot>

Changes

v3.0.1 - Migrate TenorJS API Endpoint
v3.0.2 - Add medical advice commands
v3.0.3 - Fix broken /requests command
v3.0.4 - Add ability to use multiple aliases
v3.0.5 - Add ability to save strains
v3.0.6 - Move .strain to /strain and add Autocomplete v3.0.7 - Add .spongebob replies v3.0.8 - Add ability to open requests by pages