fix: Caching issue on unfocus
This commit is contained in:
@@ -168,7 +168,9 @@ class FocusComponent(cmds.Component):
|
|||||||
@cmds.command(name="unfocus")
|
@cmds.command(name="unfocus")
|
||||||
async def unfocus_cmd(self, ctx):
|
async def unfocus_cmd(self, ctx):
|
||||||
profile = await self.bot.profiles.fetch_profile(ctx.chatter, touch=True)
|
profile = await self.bot.profiles.fetch_profile(ctx.chatter, touch=True)
|
||||||
row = await Hyperfocuser.table.delete_where(profileid=profile.profileid)
|
row = await Hyperfocuser.fetch(profile.profileid)
|
||||||
|
if row:
|
||||||
|
await row.delete()
|
||||||
|
|
||||||
await ctx.reply(
|
await ctx.reply(
|
||||||
"Welcome back from focus, hope it went well!"
|
"Welcome back from focus, hope it went well!"
|
||||||
|
|||||||
Reference in New Issue
Block a user