Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mguellsegarra/diceroll_telegram_bot
π² An easy implementation of a Telegram bot for rolling the dice
https://github.com/mguellsegarra/diceroll_telegram_bot
dice-roller nodejs random-generation telegram telegram-api telegram-bot telegram-bot-api
Last synced: about 2 months ago
JSON representation
π² An easy implementation of a Telegram bot for rolling the dice
- Host: GitHub
- URL: https://github.com/mguellsegarra/diceroll_telegram_bot
- Owner: mguellsegarra
- License: mit
- Created: 2017-11-12T13:53:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-25T09:03:25.000Z (over 6 years ago)
- Last Synced: 2023-11-11T15:28:42.099Z (about 1 year ago)
- Topics: dice-roller, nodejs, random-generation, telegram, telegram-api, telegram-bot, telegram-bot-api
- Language: JavaScript
- Homepage:
- Size: 379 KB
- Stars: 11
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π² Diceroll Telegram Bot
An easy implementation of a Telegram bot for rolling the dice. Thanks to [@yagop](https://github.com/yagop) for his fantastic [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api) library. Also thanks to [@takkytsubasa](http://telegram.me/takkytsubasa) for showing interest in my work and encourage me to publish it.
![alt text](https://raw.githubusercontent.com/mguellsegarra/diceroll_telegram_bot/master/screenshot.png)
There are two bots running this software and available for everyone in Telegram:
- *[@DiceRollBot](http://telegram.me/RollDiceBot)* - English bot for rolling the dice
- *[@TiraDausBot](http://telegram.me/TiraDausBot)* - Same bot for catalan speakers## Usage
Just clone this repo and edit `config.json` file in order to change the bot API key:
```json
{
"telegram_api_token": "",
"default_locale": "en"
}
```Run it!
```
# node index.js
```And enjoy rolling the dice.
I personally use [pm2](https://github.com/Unitech/pm2) to run it in my server.
## i18n
The bot supports i18n, so you can specify a locale:
```
# node index.js --locale ca
```The localization files are found in `locales/` folder. Default locale if you don't specify any is english `en`.
Feel free to open PR's if you want to contribute adding more languages!
## License
The MIT License (MIT)
Copyright (c) 2017 Marc GΓΌell Segarra