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 message.author == self.__bot.user:
if len(message.embeds) > 0: if len(message.embeds) > 0:
embed = message.embeds[0] embed = message.embeds[0]
fields = embed.fields if len(embed.fields) > 0:
if embed.fields[0].name == 'Uploader:':
if fields != discord.Embed.EmptyEmbed:
await message.delete() await message.delete()
except: except:
continue continue

View File

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

View File

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