1
0
Fork 0

Clear action miss some vars and update list now check if the message still exists

This commit is contained in:
Ethanell 2020-04-10 19:10:03 +02:00
parent c961274377
commit 4bb5695bd4

View file

@ -208,7 +208,9 @@ class Speak(commands.Cog):
self.voice_chan = None
if self.last_message:
await self.last_message.delete()
self.last_message = None
await self.voice_message.delete()
self.voice_message = None
@commands.Cog.listener()
async def on_reaction_remove(self, reaction: Reaction, user: Member):
@ -221,6 +223,7 @@ class Speak(commands.Cog):
await self.update_list(reaction.message.channel.guild)
async def update_list(self, guild: Guild):
if self.voice_message:
persons = []
if len(self.reaction) != 0:
for i, reaction in enumerate(self.reaction):