leftbones / dicebot Goto Github PK
View Code? Open in Web Editor NEWDice rolling robot made for Reddit
Dice rolling robot made for Reddit
Currently bot settings are at the top of the dicebot.py
file, they should be moved to a separate settings file. It would make for easier editing and for easier updating, if the bot is updated and code in dicebot.py
is changed (very likely) the user's settings won't be overwritten.
If the bot is updated and there are new settings that aren't found in the user's settings file, the user's old settings file will be backed up and a new settings file will be created, then the user can easily copy over their old settings to the new one.
No error, just doesn't lex them at all.
Current example:
[1d20 to hit Mol'Rek!]
You rolled: 18 to hit MolRek
Requested:
[1d20 to hit Mol'Rek!]
You rolled: 18 to hit Mol'Rek!
Current example:
[1d20+5 to hit]
You rolled: 20 to hit
Requested:
[1d20+5 to hit]
You rolled: 20 (15 + 5) to hit
If the bot tries to check its inbox and receives a server error 500 or something similar, it spams the console with error messages, but doesn't crash, just carries on.
Example (markdown would be applied, like bold and such)
Advantage:
[1d20 (A) to hit]
You rolled: 18 to hit (A: 13, **18**)
Disadvantage:
[1d20 (D) to hit]
You rolled: 13 to hit (D: **13**, 18)
With modifier:
[1d20+5 (A) to hit]
You rolled: 23 (18+5) to hit (A: 13, **18**)
Without flavor text:
[1d20-5 (D) to hit]
You rolled: 8 (13-5)(D: **13**, 18)
Having no commands in your comment gives the proper response, but sending an empty command causes the bot to respond with an empty roll.
Example:
Comment: []
Response: You rolled:
People usually don't roll really large numbers, but in case they do...
Current example:
[1d1000000]
You rolled: 458331
Requested:
[1d1000000]
You rolled: 458,331
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.