🐛 Change the way defer works, so it's all done by the bot instance
This commit is contained in:
@ -26,10 +26,7 @@ class ConnectFour():
|
||||
|
||||
# Starts the game
|
||||
async def start(self, ctx, opponent):
|
||||
try:
|
||||
await ctx.defer()
|
||||
except:
|
||||
self.bot.log("Defer failed")
|
||||
await self.bot.defer(ctx)
|
||||
user = f"#{ctx.author.id}"
|
||||
channel = str(ctx.channel_id)
|
||||
game = self.bot.database["connect 4 games"].find_one({"_id":channel})
|
||||
@ -228,10 +225,7 @@ class ConnectFour():
|
||||
|
||||
# Parses command
|
||||
async def surrender(self, ctx):
|
||||
try:
|
||||
await ctx.defer()
|
||||
except:
|
||||
self.bot.log("Defer failed")
|
||||
await self.bot.defer(ctx)
|
||||
channel = str(ctx.channel_id)
|
||||
game = self.bot.database["connect 4 games"].find_one({"_id":channel})
|
||||
|
||||
|
Reference in New Issue
Block a user