🐛 Change the way defer works, so it's all done by the bot instance

This commit is contained in:
NikolajDanger
2021-04-12 10:20:25 +02:00
parent 1acc0d407d
commit 78d8575e15
12 changed files with 31 additions and 61 deletions

View File

@ -15,7 +15,7 @@ class Money():
else: return 0
async def sendBalance(self, ctx):
await ctx.defer()
await self.bot.defer(ctx)
response = self.checkBalance("#"+str(ctx.author.id))
if response == 1:
new_message = ctx.author.display_name + " has " + str(response) + " GwendoBuck"
@ -36,10 +36,7 @@ class Money():
# Transfers money from one user to another
async def giveMoney(self, ctx, user, amount):
try:
await ctx.defer()
except:
self.bot.log("Defer failed")
await self.bot.defer(ctx)
username = user.display_name
if self.bot.databaseFuncs.getID(username) == None:
async for member in ctx.guild.fetch_members(limit=None):