treetrnk / rollem-telegram-bot Goto Github PK
View Code? Open in Web Editor NEW🎲 An RPG dice rolling bot for Telegram.
Home Page: https://telegram.me/rollembot
License: GNU Lesser General Public License v3.0
🎲 An RPG dice rolling bot for Telegram.
Home Page: https://telegram.me/rollembot
License: GNU Lesser General Public License v3.0
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
Please fix the Bug. I need to use the Telegram dice bot.
Looks like the bot is down again
Some items in the equation are separated by a space while others are not.
For example:
/roll 4d6+3+2d4
#Current output:
4 + 2 + 3 + 1 + 3 + 1 + 3 = 17
#Possible suggested output:
(4 + 2 + 3 + 1) + 3 + (1 + 3) = 17
For an example of this, see this article: https://en.wikipedia.org/wiki/Dice_notation#Open-ended_variations
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
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
.
Hello!
Recently the bot stopped working out of the blue.
The commands do not give any response.
If I use /roll 4d6*2
the result will be something like this: 2 + 2 + 5 + 1*2 = 11
. However, it should multiply the result of the preceding dice notation like this: (2 + 2 + 5 + 1) * 2 = 20
. This issue goes along with #5 because the solution to this issue will probably resolve #5 as well. To fix this, add parentheses around each dice notation result.
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!
Hello guys, thanks for that amazing roller!
But, whats happend? the bot do not respond anymore :/
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]
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.
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.
This can be done via the API's built-in options.
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?
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.
Ie, any command /command@rollembot should produce the same output as /command
Bot seems to be down. Could you please verify? Thanks
If you roll a die with one side like so /r 3d1!
it breaks the bot. An if statement needs to be added to avoid one and zero-sided dice.
When using it on supergroups, it sometimes just ignore the rolling commands, like /roll 4df
. Adding it as a friend and use it into another conversation works correctly
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!
Typing in /help
suggests that you type in help()
. Python then responds to this command and stalls out the bot.
This would use the typical [number of dice]d[number of dice sides] format. For example, to roll 2 20-sided dice it would be: /roll 2d20
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.