Skip to content

Commit

Permalink
maitenence and stuff idk
Browse files Browse the repository at this point in the history
  • Loading branch information
2vw committed Mar 26, 2024
1 parent b8612c1 commit 050f3cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cogs/economy.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ def setup(client) -> commands.Cog:

async def create_account(ctx):
await ctx.send("You dont have a bank account registered in our database! I can resgister you now, is that okay? *(Yes/No)*")
message = await client.wait_for("message", check=lambda message: message.author.id != client.user.id, timeout=15)
try:
message = await client.wait_for("message", check=lambda message: message.author.id != client.user.id, timeout=15)
except asyncio.TimeoutError:
return await ctx.send(f"{ctx.author.mention} | Timed out! Please try again!")
if any(x in message.content.lower() for x in ["yes", "y", "yea", "yeah", "yup"]):
return await ctx.send(await add_user(ctx.author))
else:
Expand Down
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ async def on_message_error(error: Exception, message):
colour="#516BF2"
)
return await message.reply(message.author.mention, embed=embed)
elif isinstance(error, PermissionError):
try:
return await message.reply("I don't have permission to do that!", delete_after=3)
except:
pass
else:
raise(error)

Expand Down

0 comments on commit 050f3cf

Please sign in to comment.