Merge branch 'staging' into feature-timer
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
CONFIG_FILE = "config/bot.conf"
|
CONFIG_FILE = "config/bot.conf"
|
||||||
DATA_VERSION = 6
|
DATA_VERSION = 7
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ async def _expiry_tracker(client):
|
|||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
key = _next()
|
key = _next()
|
||||||
diff = utc_now().timestamp() - _expiring[key] if key else None
|
diff = _expiring[key] - utc_now().timestamp() if key else None
|
||||||
await asyncio.wait_for(_wakeup_event.wait(), timeout=diff)
|
await asyncio.wait_for(_wakeup_event.wait(), timeout=diff)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
# Timeout means next doesn't exist or is ready to expire
|
# Timeout means next doesn't exist or is ready to expire
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ async def embed_reply(ctx, desc, colour=discord.Colour.orange(), **kwargs):
|
|||||||
try:
|
try:
|
||||||
return await ctx.reply(embed=embed, reference=ctx.msg.to_reference(fail_if_not_exists=False))
|
return await ctx.reply(embed=embed, reference=ctx.msg.to_reference(fail_if_not_exists=False))
|
||||||
except discord.Forbidden:
|
except discord.Forbidden:
|
||||||
if not ctx.guild or ctx.ch.permissions_for(ctx.guild.me).send_mssages:
|
if not ctx.guild or ctx.ch.permissions_for(ctx.guild.me).send_messages:
|
||||||
await ctx.reply("Command failed, I don't have permission to send embeds in this channel!")
|
await ctx.reply("Command failed, I don't have permission to send embeds in this channel!")
|
||||||
raise SafeCancellation
|
raise SafeCancellation
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user