mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 09:22:31 -05:00
Update dependencies and copyright year (#2436)
- aiohttp 3.5 - websockets 7 - Rapptz/discord.py@700dbb5 - A few others Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"""
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2017 Rapptz
|
||||
Copyright (c) 2015-2019 Rapptz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -385,22 +385,18 @@ class Command:
|
||||
# for use with a manual undo
|
||||
previous = view.index
|
||||
|
||||
# parsing errors get propagated
|
||||
view.skip_ws()
|
||||
argument = quoted_word(view)
|
||||
try:
|
||||
value = await self.do_conversion(ctx, converter, argument, param)
|
||||
except CommandError:
|
||||
if not result:
|
||||
if required:
|
||||
raise
|
||||
else:
|
||||
view.index = previous
|
||||
return param.default
|
||||
view.index = previous
|
||||
break
|
||||
else:
|
||||
result.append(value)
|
||||
|
||||
if not result and not required:
|
||||
return param.default
|
||||
return result
|
||||
|
||||
async def _transform_greedy_var_pos(self, ctx, param, converter):
|
||||
@@ -750,9 +746,9 @@ class Command:
|
||||
If that lookup leads to an empty string then the first line of the
|
||||
:attr:`help` attribute is used instead.
|
||||
"""
|
||||
if self.brief:
|
||||
if self.brief is not None:
|
||||
return self.brief
|
||||
if self.help:
|
||||
if self.help is not None:
|
||||
return self.help.split("\n", 1)[0]
|
||||
return ""
|
||||
|
||||
@@ -771,7 +767,7 @@ class Command:
|
||||
name = self.name if not parent else parent + " " + self.name
|
||||
result.append(name)
|
||||
|
||||
if self.usage:
|
||||
if self.usage is not None:
|
||||
result.append(self.usage)
|
||||
return " ".join(result)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user