mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Update events.py (#4431)
This commit is contained in:
parent
a2ae485286
commit
284080ec83
@ -297,12 +297,17 @@ def init_events(bot, cli_flags):
|
|||||||
msg = _("This command is on cooldown. Try again in 1 second.")
|
msg = _("This command is on cooldown. Try again in 1 second.")
|
||||||
await ctx.send(msg, delete_after=error.retry_after)
|
await ctx.send(msg, delete_after=error.retry_after)
|
||||||
elif isinstance(error, commands.MaxConcurrencyReached):
|
elif isinstance(error, commands.MaxConcurrencyReached):
|
||||||
await ctx.send(
|
if error.per is commands.BucketType.default:
|
||||||
_(
|
msg = _(
|
||||||
|
"Too many people using this command."
|
||||||
|
" It can only be used {number} time(s) concurrently."
|
||||||
|
).format(number=error.number)
|
||||||
|
else:
|
||||||
|
msg = _(
|
||||||
"Too many people using this command."
|
"Too many people using this command."
|
||||||
" It can only be used {number} time(s) per {type} concurrently."
|
" It can only be used {number} time(s) per {type} concurrently."
|
||||||
).format(number=error.number, type=error.per.name)
|
).format(number=error.number, type=error.per.name)
|
||||||
)
|
await ctx.send(msg)
|
||||||
else:
|
else:
|
||||||
log.exception(type(error).__name__, exc_info=error)
|
log.exception(type(error).__name__, exc_info=error)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user