Don't need local error handling for that

pull/9/head
sgoudham 4 years ago
parent 502e491132
commit 83c28fb037

@ -26,8 +26,7 @@ from typing import Optional, Union
from discord import Embed, Role from discord import Embed, Role
from discord import Member, TextChannel from discord import Member, TextChannel
from discord import __version__ as discord_version from discord import __version__ as discord_version
from discord.ext.commands import BucketType, cooldown, bot_has_permissions, guild_only, Cog, MissingRequiredArgument, \ from discord.ext.commands import BucketType, cooldown, bot_has_permissions, guild_only, Cog
BadUnionArgument
from discord.ext.commands import command from discord.ext.commands import command
from psutil import Process, virtual_memory from psutil import Process, virtual_memory
@ -616,18 +615,6 @@ class Info(Cog):
await ctx.send(embed=embed) await ctx.send(embed=embed)
@perms.error
async def mlsetup_command_error(self, ctx, exc):
"""Catching error if User or Channel is not recognised"""
if isinstance(exc, BadUnionArgument):
text = "**User | Role** Not Detected... Aborting Process"
await self.bot.generate_embed(ctx, desc=text)
if isinstance(exc, MissingRequiredArgument):
text = "Required Argument(s) Missing!" \
f"\nUse **{ctx.prefix}help** to find how to use **{ctx.command}**"
await self.bot.generate_embed(ctx, desc=text)
def setup(bot): def setup(bot):
bot.add_cog(Info(bot)) bot.add_cog(Info(bot))

Loading…
Cancel
Save