Removing unnecessary if statements

pull/8/head
sgoudham 4 years ago
parent 5a2539781a
commit ac7f6fc0dd

@ -147,12 +147,14 @@ class MWLMenu(menus.Menu):
async def remove_reaction(self, reaction): async def remove_reaction(self, reaction):
"""Remove the reaction given""" """Remove the reaction given"""
if self.perms.manage_messages: if self.perms.manage_messages:
await self.message.remove_reaction(reaction, self.ctx.author) await self.message.remove_reaction(reaction, self.ctx.author)
@staticmethod @staticmethod
def check(m, payload): def check(m, payload):
"""Simple check to make sure that the reaction is performed by the user""" """Simple check to make sure that the reaction is performed by the user"""
return m.author == payload.member and m.channel.id == payload.channel_id return m.author == payload.member and m.channel.id == payload.channel_id
@staticmethod @staticmethod
@ -176,14 +178,9 @@ class MWLMenu(menus.Menu):
""" """
if _type == "anime": __type = embed.author.name
__type = embed.author.name embed.remove_author()
embed.remove_author() return embed.set_author(name=f"{__type} | Page {cur_page}/{pages}")
return embed.set_author(name=f"{__type} | Page {cur_page}/{pages}")
elif _type == "waifu":
__type = embed.author.name
embed.remove_author()
return embed.set_author(name=f"{__type} | Page {cur_page}/{pages}")
@staticmethod @staticmethod
def set_author_after(embed, _type, cur_page, pages): def set_author_after(embed, _type, cur_page, pages):

Loading…
Cancel
Save