diff options
| author | Rapptz <[email protected]> | 2016-01-13 22:05:21 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-01-13 22:05:21 -0500 |
| commit | b1d8e12609566ac11b8abf5cb249d7e25ea2be58 (patch) | |
| tree | 0e33e60ed52fe61e9b9f3938af6ccc6ee8f0536e | |
| parent | Proper exception chaining. (diff) | |
| download | discord.py-b1d8e12609566ac11b8abf5cb249d7e25ea2be58.tar.xz discord.py-b1d8e12609566ac11b8abf5cb249d7e25ea2be58.zip | |
[commands] Cleanup descriptions being passed.
| -rw-r--r-- | discord/ext/commands/bot.py | 2 | ||||
| -rw-r--r-- | discord/ext/commands/core.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 24e1d4b9..df4b93db 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -139,7 +139,7 @@ class Bot(GroupMixin, discord.Client): self.extra_events = {} self.cogs = {} self.extensions = {} - self.description = description + self.description = inspect.cleandoc(description) self.pm_help = pm_help if formatter is not None: if not isinstance(formatter, HelpFormatter): diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index db597734..6e9e4343 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -107,7 +107,7 @@ class Command: self.brief = kwargs.get('brief') self.aliases = kwargs.get('aliases', []) self.pass_context = kwargs.get('pass_context', False) - self.description = kwargs.get('description') + self.description = inspect.cleandoc(kwargs.get('description', '')) self.hidden = kwargs.get('hidden', False) signature = inspect.signature(callback) self.params = signature.parameters.copy() |