Giter VIP home page Giter VIP logo

rollem-telegram-bot's Introduction

RollEm Telegram Bot

A polyhedral dice rolling bot for Telegram. To use this bot in Telegram, click here. This bot was built to enable playing tabletop roleplaying games (RPGs) over Telegram.

Requires

Current Features

  • /roll [equation] [label] or /r [equation] [label]
    • Equation is required, label is optional.
    • Roll dice using dice notation as the equation (includes Fate/Fudge Dice with 4dF). Do not include spaces in the equation.
    • Example: /roll 4d8+16-2d4
    • Exploding dice with exclamation point: /r 6d6!
    • Highest and Lowest dice kept for advantage/disadvantage: /r 2d20H Advantage
  • /rf [modifier] [label]
    • The modifier and label are optional, but if both are given the modifier must come first.
    • Roll 4 Fate (Fudge) dice.
    • Example: /rf 3 Athletics

SEE THE WIKI for usage instructions and examples.

Running The Code

To run the code, download and extract to a folder. You will need to use the Bot Father bot to generate a token for your app. Once you have that token, use the command below to run the bot. Replace /PATH/TO/ with the path to bot.py on your computer and [YOUR_TOKEN_HERE] with the token you just generated through the Bot Father.

/PATH/TO/bot.py [YOUR_TOKEN_HERE]

Troubleshooting

If you are receiving an error that says Server response could not be decoded using UTF-8, make the following changes to the python-telegram-bot requests.py file: Bug Fix Diff

rollem-telegram-bot's People

Contributors

mattiadg avatar treetrnk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rollem-telegram-bot's Issues

Bot dosen't work

Hello!
Recently the bot stopped working out of the blue.
The commands do not give any response.

Permission to delete roll

Not really an issue, more like question.

My D&D Telegram group is using roll bot for our in between session events. And we agreed that deleting a bad roll is forbidden. But I was wondering is it possible that admin of the group can setup that roll bot posts can’t be deleted from the thread. Or that just admin can delete them...
Hope I’m clear enough what is the idea here?

Allow diacritcs in label

First, great bot ! 👍

Could it be possible to support diacritcs in label ?

For instance, this doesn't work :
5dF éloquence

But this does :
5dF eloquence

Thanks.

No way to do 4d6dl

Bot doesn't seem to obey 4d6dl, 4d6-L1, 4d6kh3 or any other standard dice notation for 4d6 drop lowest. It often only outputs the sum of all 4 dice rolls, ignoring the notation. Would be great to be able to do this!

Selective results notation is not incorporated

There is currently no way to do advantage or disadvantage automatically (AFAIK), so incorporating a notation of AdX(kY) -> keeps the top Y rolls and AdX(klY)-> keeps the bottom Y rolls or something like that would be a great addition, for simplicity using H and L rather than K and KL is also an option.

WIKI:
https://en.wikipedia.org/wiki/Dice_notation

Some games extend the standard notation to AdX(kY)+B where, in addition to the above, Y is the number of dice kept ("k") from the roll. Whether the dice omitted are the highest, lowest, or the player's choice depends on the game in question. 7th Sea and Legend of the Five Rings use only 10-sided dice, with notation of the form 8k6, meaning "Roll eight ten-sided dice, keep the highest six, and sum them." Although using a Roll and keep system, Cortex Plus games all use roll all the dice of different sizes and keep two (normally the two best) although a Plot Point may be spent to keep an additional dice, and some abilities let you keep a third automatically.

An alternative notation used by the OpenRoleplaying.org die roller allows the use of a plus or minus followed by "L" or "H" instead of the modifier B, to denote dropping or re-adding the lowest or highest roll on a single die, as in 4d6−L, which means roll 4 times a 6-sided dice and drop the lowest value,respectively.[11]

Bot do not respond

Hello guys, thanks for that amazing roller!
But, whats happend? the bot do not respond anymore :/

help run with my token

good afternoon, I wanted to run it on my computer for tests, but I didn’t understand where to add the token for the telegram bot, at startup it swears at TOKEN = sys.argv[1], please tell me how to run it.

Roll from custom table

Sometimes you need to roll for an element from a list and it would be nice, if the bot could support that feature, e.g.:

/roll [Frank, Christa, Amy, Joel] Who goes first?

response could be

@user rolled Who goes first?:
Christa

Add ability to do inline commands

Inline commands allow @ mentions of the bot from a conversation that the bot is not part of. Enabling this will allow you to roll dice from any conversation you are in via commands such as @rollembot /roll 4df+3.

Bot is down

Bot seems to be down. Could you please verify? Thanks

Highest/Lowest mixed with addition

Hi!
Congrats for the bot. It's very usefull.

I've seen that comands like:
/r 1d20 + 3d6h + 3

are giving this kind of answer:
rolled + 3d6h + 3:
(3) =
3

Or:
rolled + 3d6h + 3:
(14) =
14

Seems that everything before or after the Highest/Lowest command is ignored. Is it a known error?

Dice rolling is bugged

I'm using this bot, and it acts weird.

Rolling the README example:

/roll 4d8+16-2d4

It replies:

username: Invalid equation!
Please use dice notation.
For example: 3d6, or 1d20+5, or d12
For more information, type /help

Bot Stopped working

Hello,

Today (June, 14th), when I tried rolling some d10s, Roll'em Bot did not respond, while yesterday (June, 13th), it was working fine as always.

I have no clue on what happened or on how to solve this, if something can be done on my side.
Any help would be useful.

Thanks in advance.

Roll 'em Bot does not work!

Hi,
We have tried to use this bot on our group in Telegram, but although it worked some days ago, it's not working now.
Any advice, please?

Can you help us to solve this issue?

Many thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.