mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
update for d.py 1.3 (#3445)
* update for d.py 1.3 * Update redbot/core/commands/commands.py Co-Authored-By: Danny <Rapptz@users.noreply.github.com> * a few more places we use owner info * add the cli flag + handling * set fix * Handle MaxConcurrencyReached. * Bump `aiohttp-json-rpc` Co-authored-by: Danny <Rapptz@users.noreply.github.com> Co-authored-by: Kowlin <Kowlin@users.noreply.github.com> Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -49,8 +49,13 @@ def init_events(bot, cli_flags):
|
||||
users = len(set([m for m in bot.get_all_members()]))
|
||||
|
||||
app_info = await bot.application_info()
|
||||
if bot.owner_id is None:
|
||||
bot.owner_id = app_info.owner.id
|
||||
|
||||
if app_info.team:
|
||||
if bot._use_team_features:
|
||||
bot.owner_ids = {m.id for m in app_info.team.members}
|
||||
else:
|
||||
if bot.owner_id is None:
|
||||
bot.owner_id = app_info.owner.id
|
||||
|
||||
try:
|
||||
invite_url = discord.utils.oauth_url(app_info.id)
|
||||
@@ -213,6 +218,12 @@ def init_events(bot, cli_flags):
|
||||
),
|
||||
delete_after=error.retry_after,
|
||||
)
|
||||
elif isinstance(error, commands.MaxConcurrencyReached):
|
||||
await ctx.send(
|
||||
"Too many people using this command. It can only be used {} time(s) per {} concurrently.".format(
|
||||
error.number, error.per.name
|
||||
)
|
||||
)
|
||||
else:
|
||||
log.exception(type(error).__name__, exc_info=error)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user