From 496f5d04729d4e85f902999481b8feb2d482f3da Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 3 Jan 2017 09:20:09 -0500 Subject: [PATCH] [commands] Fix help command from not working with recent changes. --- discord/ext/commands/bot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index faa2c1098..724372f77 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -95,7 +95,7 @@ def _default_help_command(ctx, *commands : str): else: command = bot.commands.get(name) if command is None: - yield from bot.send_message(destination, bot.command_not_found.format(name)) + yield from destination.send(bot.command_not_found.format(name)) return pages = bot.formatter.format_help_for(ctx, command) @@ -103,7 +103,7 @@ def _default_help_command(ctx, *commands : str): name = _mention_pattern.sub(repl, commands[0]) command = bot.commands.get(name) if command is None: - yield from bot.send_message(destination, bot.command_not_found.format(name)) + yield from destination.send(bot.command_not_found.format(name)) return for key in commands[1:]: @@ -111,10 +111,10 @@ def _default_help_command(ctx, *commands : str): key = _mention_pattern.sub(repl, key) command = command.commands.get(key) if command is None: - yield from bot.send_message(destination, bot.command_not_found.format(key)) + yield from destination.send(bot.command_not_found.format(key)) return except AttributeError: - yield from bot.send_message(destination, bot.command_has_no_subcommands.format(command, key)) + yield from destination.send(bot.command_has_no_subcommands.format(command, key)) return pages = bot.formatter.format_help_for(ctx, command) @@ -126,7 +126,7 @@ def _default_help_command(ctx, *commands : str): destination = ctx.message.author for page in pages: - yield from bot.send_message(destination, page) + yield from destination.send(page) class Bot(GroupMixin, discord.Client):