-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
DATABASE_URL='./data/database.db' | ||
PORT=3000 | ||
DISCORD_TOKEN='' | ||
DISCORD_CHANNEL_ID='' | ||
DISCORD_GUILD_ID='' | ||
GIPHY_API_KEY='' | ||
DISCORD_TOKEN='MTI2NzgzMTU1NTc0MTU4MTM4Mg.G8mDef.HfkhetjZXJX3l2H7pOYEvYYV2CDu3EDy3Ox5bw' | ||
DISCORD_CHANNEL_ID='1267837479835402260' | ||
DISCORD_SERVER_ID='1267492271385743421' | ||
GIPHY_API_KEY='RezKMkdertExeFOQQrI54n632J31BHTp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ It's a dynamic Discord bot powered by a REST API that celebrates user achievemen | |
|
||
- [Bravo! Bot 🎉](#bravo-bot-) | ||
- [Features](#features) | ||
- [TL;DR SETUP](#tldr-setup) | ||
- [Discord Setup](#discord-setup) | ||
- [Project Setup](#project-setup) | ||
- [Examples](#examples) | ||
- [Messages](#messages) | ||
- [CRUD Sprints (praises | templates | users | emojis)](#crud-sprints-praises--templates--users--emojis) | ||
|
@@ -20,6 +20,30 @@ It's a dynamic Discord bot powered by a REST API that celebrates user achievemen | |
- DB is seeded with data. | ||
- GH Action for linting and testing. | ||
|
||
## TL;DR SETUP | ||
|
||
1. Join test server https://discord.gg/vAxt2mvsNe | ||
2. Clone repo, setup and run app: | ||
|
||
```sh | ||
git clone [email protected]:viliusddd/bravo-bot.git && \ | ||
cd bravo-bot && \ | ||
cp .env.example .env && \ | ||
npm i && \ | ||
npm run migrate:latest && \ | ||
npm run dev | ||
``` | ||
|
||
3. Execute cUrl POST in cli (or any other cmd from [Examples](#examples)): | ||
|
||
```sh | ||
curl -sX POST http://localhost:3000/messages \ | ||
-H 'Content-Type: application/json' \ | ||
-d '{"username": "vjuodz", "sprintCode": "WD-1.3.4"}' | jq | ||
``` | ||
|
||
4. Voila! Check message at discord server. | ||
|
||
## Discord Setup | ||
|
||
1. Create a copy of `.env.example` and rename it to `.env` | ||
|
@@ -37,18 +61,6 @@ It's a dynamic Discord bot powered by a REST API that celebrates user achievemen | |
4. paste copied url at you internet browser, choose channel you want your bot to reside. | ||
7. Paste yur app token to the `.env` and fill in the rest of the variables. | ||
|
||
## Project Setup | ||
|
||
1. Clone repo, `cd` and run `npm i` at project root dir. | ||
2. Create copy of `.env.example` and rename it to `.env` | ||
3. Add correct values to `.env` | ||
4. Seed example data to database and update types (optionally): | ||
|
||
```sh | ||
npm run migrate:latest | ||
npm run gen:types | ||
``` | ||
|
||
## Examples | ||
|
||
### Messages | ||
|