Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grummfy/couvee-bot
discord bot for la couvée http://editions-6napse.fr/#product-new-born
https://github.com/grummfy/couvee-bot
Last synced: 29 days ago
JSON representation
discord bot for la couvée http://editions-6napse.fr/#product-new-born
- Host: GitHub
- URL: https://github.com/grummfy/couvee-bot
- Owner: Grummfy
- License: agpl-3.0
- Created: 2020-04-17T15:31:55.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T12:53:25.000Z (almost 2 years ago)
- Last Synced: 2024-11-21T13:18:41.196Z (3 months ago)
- Language: TypeScript
- Size: 321 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Couvée-Bot
## Behaviour
* #help : display help, list of commands, etc
* #start Xplayer : can be shorten Xp, start a new game with **X** player. If a game is running ask for confirmation before killing previous game.
* #end : stop the current game
* launch dices: from your personal one (i), or the group (g) or neutral (n)
* #r Xg+Yi+Z : launch **X** dice taken randomly from the cc**g**, **Y** from the cc**i**, **Z** from the bonus
* #r Xg : launch **X** dice taken randomly from the cc**g** (group dice)
* #r Xi : launch **X** dice from the cc**i** (from yourself) and eventually add some neutral or whatever stay there
* #r Xg+Y : launch **X** dice from the cc**g** then add **Y** bonus dice
* #r Xg+Yi : launch **Y** dice from the cc**i** then add **X** dice from the cc**g**
* #r Xn+Yi : launch **Y** dice from the cc**i** then add **X** dice from the cc**g**
* #add Xn : add **X** neutral dice
* #remove Xn : remove **X** neutral dice
* #stats : display the current stats about the dices## Dev notes
This bot is developped in typescript. Mainly as an exercice.
The minimum version of node required is 12
### Init
* clone repository
* intall npm dependencies
* go to discord to create an application & bot
* create the applciation https://discordapp.com/developers/applications/me
* then create a bot with admin permission
* then copy the token to server.ts
* invite the bot to your server
* copy the client id of the app
* use the url https://discordapp.com/oauth2/authorize?client_id=&scope=bot&permissions=8
* choose your server### Compile
```npm run watch```
### Launch
```node dist/server.js```
or
```npm run start```### Note
Some helpfull ressources
* https://discordjs.guide/
* https://discord.js.org/#/docs/
* https://github.com/AnIdiotsGuide/discordjs-bot-guide
* https://discordapp.com/developers/docs/
* https://leovoel.github.io/embed-visualizer/#### Deployment
You will require
* a oauth client id (CLIENT_ID): from https://discordapp.com/developers/applications > new app > oauth2
* a token for the bot (TOKEN): from https://discordapp.com/developers/applications > new app > bot##### Digital Ocean
[](https://cloud.digitalocean.com/apps/new?repo=https://github.com/Grummfy/couvee-bot/tree/main&refcode=f334e67637bf)
##### Heroku
[](https://heroku.com/deploy?template=https://github.com/Grummfy/couvee-bot/tree/main)
Note, the database is not kept between two redeployment... you will require to handle it yourself. Just configure a database in heropo and fill the DSN properly.
If you want to host on heroku, here is more detail (or click on the big button)
* https://github.com/AnIdiotsGuide/discordjs-bot-guide/blob/master/other-guides/heroku.md
* https://devcenter.heroku.com/articles/procfile
* https://devcenter.heroku.com/articles/dyno-metadata