diff --git a/README.md b/README.md index 0881529..34bc147 100644 --- a/README.md +++ b/README.md @@ -18,4 +18,83 @@ Use the `/help` command to see the bot's help message. 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. \ No newline at end of file +6. Check for and create database tables if necessary. Handle errors. + +# Deploy NodBot Yourself + +1. Create an application at the [Discord Developer Portal](https://discord.com/developers/applications) +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) +6. Configure your environment variables as outlined below. +7. 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= +isDev= +dbHost= +dbPort= +dbUser= +dbPass= +dbName= +tenorAPIKey= +ownerId= +statusChannelId= +clientId= +``` \ No newline at end of file