Python based diceroller bot for discord.
To activate the bot go to https://discordapp.com/oauth2/authorize?client_id=319289665347911680&scope=bot&permissions=0
The bot will respond to any applicable commands made in the server that @mention it.
- "[roll type] n" - Rolls n dice based on conditions for [roll type]. Returns results in a single line.
- "one" - Rolls a single 10-sided die and returns the value to the channel where the command was spoken.
- "chance" - Rolls a chance die, overwites the speaker's last_roll with result. Returns die result and states whether it was a botch, failure or success to the channel where the command was spoken.
The bot will respond to natural language commands as long as the keyword is present. For example, if you write "Hello @Dicecord can you roll me 4 dice please" it is the same as writing "@Dicecord roll 4". It figures out the amount to roll based on the following logic where x is a number of dice:
- Looks for a phrase like "roll x"
- Looks for a phrase like "9again/8again/noagain x"
- Takes first number after the @mention
- Takes first number in message
The bot will send flavour text in the case of 0 successes or 5+ successes. This falvour text can be themed to Chronicles of Darkness character types (a.k.a. splats) or disabled completely. Here are the commands to change these settings.
- splat [type] - Replace [type] with the splat type to get themed messaging. A confirmation will be sent as a DM.
- splat check - Check your current splat setting. Details will be sent as a DM.
- flavour [on/off] - Turn flavour text on or off. A confirmation will be sent as a DM.
- flavour check - Check your current flavour setting. Details will be sent as a DM.
You can also DM it the following commands to repeat these instructions.
- "help" - Replies with help text.
- "type" - Replies to with the types of rolls available.
Splat and flavour settings are specific to each channel on your server. For example, if I have a #Mage channel and a #Vampire channel I could have different settings in each. The settings saved determine which flavour to attribute to a user id in a channel id, no usernames, channel/server names or message content is ever saved.
In addition, users can opt to delete their stored settings at any time. To do so write !delete user in the channel you want to delete information from. There are also commands to delete all players' settings from a channel or server, !delete channel or !delete server. Please make sure other players are okay with you deleting their settings before using it. If a character does not roll over the course of 30 days their settings will be automatically purged.
- Python 3.6+
Discord.py
API wrapper and its requirements. Github: Rapptz