This is a custom command script for the YAGPDB Discord Bot. It is a virtual dice roller for the "plot die" for the Cosmere RPG.
It is designed to work with the plot die emoji from the Cosmere RPG Discord Server.
Note the source code is not JavaScript but it was the closest syntax highlighting I could find on GitHub, you can ignore the file extension.
With the default command name and prefix:
-plotdie
or -plotdie 1
rolls a single plot die.
-plotdie 2
rolls two plot dice.
Other amounts are currently unsupported, but I don't think you would ever need to roll more than two at once when you have advantage or disadvantage.
This script is only intended for rolling plot dice, but YAGPDB has a built-in dice roller command that can roll other types of dice. Rollem is also another good dice roller bot for Discord.
Add YAGPDB to your server if it isn't in it already, and create a new custom command.
I used the trigger plotdie
and the name Plot Die Roll
, but this can be whatever you want.
Copy the custom command script from this repository into the response editor.
I think you can leave all the other settings as default, and click save.
This command is designed to use custom emoji to match the symbols of the plot die. I got these from the Cosmere RPG Discord server, but you can use any emoji.
Note that for custom emoji using the user-friendly name like :Opportunity:
will not work here, use the method below to get the emoji ID.
If you want to use custom emoji like these, upload them to your Discord server and send them in a message. Then, copy the message. You should see emoji ID like so:
<:Complication4:1324770126553157684> <:Complication2:1324770111827214386> <:Opportunity:1324770094622179450>
Paste these into the script in the respective variable definitions indicated by the comment. So for example, for these IDs, the code should look as follows:
{{/*Replace these with the emoji IDs you want to use. Copy a message with custom server emoji to the clipboard to obtain its emoji ID. */}}
{{$complication4 := "<:Complication4:1324770126553157684>"}}
{{$complication2 := "<:Complication2:1324770111827214386>"}}
{{$neutral := ":white_large_square:"}}
{{$opportunity := "<:Opportunity:1324770094622179450>"}}