Refactoring clean messages

This commit is contained in:
Rafael Vargas 2022-01-12 11:31:15 -04:00
parent 173b6a7b43
commit 0d606361da
3 changed files with 4 additions and 5 deletions

View File

@ -201,10 +201,10 @@ class Music(commands.Cog):
if message.author == self.__bot.user:
if len(message.embeds) > 0:
embed = message.embeds[0]
fields = embed.fields
if len(embed.fields) > 0:
if embed.fields[0].name == 'Uploader:':
await message.delete()
if fields != discord.Embed.EmptyEmbed:
await message.delete()
except:
continue

View File

@ -271,7 +271,7 @@ class Player(commands.Cog):
elif args == 'off':
description = self.__playlist.loop_off()
else:
description = config.HELP_LONG_LOOP
description = help.HELP_LONG_LOOP
return description

View File

@ -100,7 +100,6 @@ class Playlist(IPlaylist):
def clear(self) -> None:
"""Clear the songs to play song history"""
self.__queue.clear()
self.__songs_history.clear()
def loop_one(self) -> str:
"""Try to start the loop of the current song