Properly check for command's existence in [p]alias add (#3734)

This commit is contained in:
jack1142 2020-04-09 00:19:14 +02:00 committed by GitHub
parent c70c1d97e5
commit 55a3d9b157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,7 @@ class Alias(commands.Cog):
) )
return return
given_command_exists = self.bot.get_command(command) is not None given_command_exists = self.bot.get_command(command.split(maxsplit=1)[0]) is not None
if not given_command_exists: if not given_command_exists:
await ctx.send( await ctx.send(
_("You attempted to create a new alias for a command that doesn't exist.") _("You attempted to create a new alias for a command that doesn't exist.")