Skip to content

Commit 050f3cf

Browse files
committed
maitenence and stuff idk
1 parent b8612c1 commit 050f3cf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

cogs/economy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ def setup(client) -> commands.Cog:
267267

268268
async def create_account(ctx):
269269
await ctx.send("You dont have a bank account registered in our database! I can resgister you now, is that okay? *(Yes/No)*")
270-
message = await client.wait_for("message", check=lambda message: message.author.id != client.user.id, timeout=15)
270+
try:
271+
message = await client.wait_for("message", check=lambda message: message.author.id != client.user.id, timeout=15)
272+
except asyncio.TimeoutError:
273+
return await ctx.send(f"{ctx.author.mention} | Timed out! Please try again!")
271274
if any(x in message.content.lower() for x in ["yes", "y", "yea", "yeah", "yup"]):
272275
return await ctx.send(await add_user(ctx.author))
273276
else:

main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,11 @@ async def on_message_error(error: Exception, message):
763763
colour="#516BF2"
764764
)
765765
return await message.reply(message.author.mention, embed=embed)
766+
elif isinstance(error, PermissionError):
767+
try:
768+
return await message.reply("I don't have permission to do that!", delete_after=3)
769+
except:
770+
pass
766771
else:
767772
raise(error)
768773

0 commit comments

Comments
 (0)