mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Customcom] Fix error on exiting customcom interactive menu. (#3417)
* [Customcom] Fixes error on exit * Changelog * Fixed spelling. * Typehinting
This commit is contained in:
parent
54e65082bc
commit
7f390df879
1
changelog.d/customcom/3416.bugfix.rst
Normal file
1
changelog.d/customcom/3416.bugfix.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fixes error on exiting customcom interactive menu.
|
||||||
@ -227,6 +227,9 @@ class CustomCommands(commands.Cog):
|
|||||||
await ctx.send(_("There already exists a bot command with the same name."))
|
await ctx.send(_("There already exists a bot command with the same name."))
|
||||||
return
|
return
|
||||||
responses = await self.commandobj.get_responses(ctx=ctx)
|
responses = await self.commandobj.get_responses(ctx=ctx)
|
||||||
|
if not responses:
|
||||||
|
await ctx.send(_("Custom command process cancelled."))
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
await self.commandobj.create(ctx=ctx, command=command, response=responses)
|
await self.commandobj.create(ctx=ctx, command=command, response=responses)
|
||||||
await ctx.send(_("Custom command successfully added."))
|
await ctx.send(_("Custom command successfully added."))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user