fixed discord roll command
This commit is contained in:
parent
103b18ac9e
commit
a535aafb1e
@ -90,6 +90,7 @@ class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
|||||||
#await discord_message.channel.send(diceRoll)
|
#await discord_message.channel.send(diceRoll)
|
||||||
|
|
||||||
async def roll(self, roll_type, discord_message: discord.Message):
|
async def roll(self, roll_type, discord_message: discord.Message):
|
||||||
|
diceRoll = ""
|
||||||
switch = {
|
switch = {
|
||||||
1: "Standard",
|
1: "Standard",
|
||||||
2: "Fate Dice"
|
2: "Fate Dice"
|
||||||
@ -139,11 +140,13 @@ class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
|||||||
print(diceRoll)
|
print(diceRoll)
|
||||||
|
|
||||||
if roll_type == 2:
|
if roll_type == 2:
|
||||||
|
print("fate Rolling....")
|
||||||
|
# !roll 4df
|
||||||
# If roll is in xdx+x format
|
# If roll is in xdx+x format
|
||||||
if loopBool == True:
|
if loopBool == True:
|
||||||
rolls: list = []
|
rolls: list = []
|
||||||
for x in range(int(parsedMessage[0])):
|
for x in range(int(parsedMessage[0])):
|
||||||
rolls.append(random.randint(1, 3)) # This is the roller
|
rolls.append(random.randint(-1, 1)) # This is the roller
|
||||||
|
|
||||||
rollTotal = 0
|
rollTotal = 0
|
||||||
for roll in rolls:
|
for roll in rolls:
|
||||||
@ -158,7 +161,7 @@ class CommandRoll(AbstractCommand, metaclass=ABCMeta):
|
|||||||
diceRoll = diceRoll + " = " + str(rollTotal)
|
diceRoll = diceRoll + " = " + str(rollTotal)
|
||||||
# If roll is in dx+x format
|
# If roll is in dx+x format
|
||||||
if loopBool == False:
|
if loopBool == False:
|
||||||
roll: int = random.randint(1, 3) # This is the roller
|
roll: int = random.randint(-1, 1) # This is the roller
|
||||||
|
|
||||||
if len(temp_preParsedMessage) == 2:
|
if len(temp_preParsedMessage) == 2:
|
||||||
diceRoll = str(roll) + " + " + temp_preParsedMessage[1] + " = " + str(
|
diceRoll = str(roll) + " + " + temp_preParsedMessage[1] + " = " + str(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user