Skip to content
Snippets Groups Projects

automute - await config set and get

Merged Callum Smith requested to merge automute into master
Compare and
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
+ 4
2
@@ -45,8 +45,10 @@ class AutoMute(commands.Cog):
if voice_client.channel == after.channel:
if (not before.deaf) and after.deaf:
# Player is now deafened
self.config.user(member).last_deafened.set(datetime.timestamp)
await self.config.user(member).last_deafened.set(datetime.timestamp)
elif (not after.deaf) and before.deaf:
# Player is now undeafened
if self.config.user(member).last_deafened() - datetime.timestamp < 2:
if (
await self.config.user(member).last_deafened()
) - datetime.timestamp < 2:
voice_client.disconnect()