Diceroll, a Telegram bot for rolling the dice

diceroll-start-bot

More than two years ago I created a basic Telegram bot in Python for rolling the dice.

I thought that could be a nice idea to have a bot to simulate rolling the dice in chat groups. Who has to clean the dishes this week? Who will pay for breakfast today? Nobody wants to do some boring task? Easy! Let’s roll the dice and let luck decide for you.

I created the first version of the bot thanks to telebot, a fancy Python starter kit for creating Telegram bots connecting to the Telegram public API.

After setting up the bot in Google App Engine, everything worked fine. But sadly, some months later, I totally forgot about the bot and eventually was turned down due to several Google Cloud migrations.

Last week, a japanese guy contacted me via Telegram, showing interest in my bot and asking me if I could fix the bot to be online again. Thanks @takkytsubasa for encouraging me to set it up again!

And today I found the time to completely rewrite the bot using NodeJS, using another library, this time from @yagop, node-telegram-bot-api.

diceroll-roll

I’ve added language support, maybe anybody can contribute translating more locales.

This time I’ve used ECMAScript 6, promises and Node 6.9.4. Added also two different modes to roll the dices, one inline with emojis, and the sticker mode, bigger.

I published the source code on Github, so if you are interested, check it out: diceroll-telegram-bot

And there are two bots running this software and available for everyone in Telegram:

@DiceRollBot - English bot for rolling the dice
@TiraDausBot - Same bot for catalan speakers

Hope you enjoy it :d