Update
This commit is contained in:
parent
df84579fb9
commit
fe683cd563
1 changed files with 11 additions and 3 deletions
12
gameutils.py
12
gameutils.py
|
@ -20,20 +20,28 @@ class GameView(nextcord.ui.View):
|
||||||
ogmsg.pop(0)
|
ogmsg.pop(0)
|
||||||
message = "It has been decreed..\n"
|
message = "It has been decreed..\n"
|
||||||
found = False
|
found = False
|
||||||
|
trunover = False
|
||||||
for i in range(len(ogmsg)):
|
for i in range(len(ogmsg)):
|
||||||
if ogmsg[i].startswith("~"):
|
if ogmsg[i].startswith("~"):
|
||||||
message = f"{message}{ogmsg[i]}\n"
|
message = f"{message}{ogmsg[i]}\n"
|
||||||
continue
|
continue
|
||||||
if not found:
|
if not found:
|
||||||
newmsg = "~~" + ogmsg[i] + "~~"
|
newmsg = "~~" + ogmsg[i] + "~~"
|
||||||
turnping = ogmsg[i+1].split("<")[1].split(">")[0]
|
|
||||||
found = True
|
|
||||||
message = message + newmsg + "\n"
|
message = message + newmsg + "\n"
|
||||||
|
found = True
|
||||||
|
try:
|
||||||
|
turnping = ogmsg[i+1].split("<")[1].split(">")[0]
|
||||||
|
except IndexError:
|
||||||
|
message = message + "The turn is over"
|
||||||
|
turnover = True
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
message = message + ogmsg[i] + "\n"
|
message = message + ogmsg[i] + "\n"
|
||||||
print(interaction.user.guild_permissions)
|
print(interaction.user.guild_permissions)
|
||||||
await interaction.response.edit_message(content=message)
|
await interaction.response.edit_message(content=message)
|
||||||
|
if turnover:
|
||||||
|
await interaction.followup.send(f"The turn has concluded")
|
||||||
|
else:
|
||||||
await interaction.followup.send(f"<{turnping}> it is now your turn!")
|
await interaction.followup.send(f"<{turnping}> it is now your turn!")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue