feat(schedule): Add DM notifications.

This commit is contained in:
2023-09-30 21:38:28 +03:00
parent 1f92957393
commit 4828e7bf8b
2 changed files with 99 additions and 2 deletions

View File

@@ -79,6 +79,18 @@ class VoiceTrackerCog(LionCog):
"""
return VoiceSession.get(self.bot, guildid, userid, **kwargs)
def is_untracked(self, channel) -> bool:
if not channel.guild:
raise ValueError("Untracked check invalid for private channels.")
untracked = self.untracked_channels.get(channel.guild.id, ())
if channel.id in untracked:
untracked = True
elif channel.category_id and channel.category_id in untracked:
untracked = True
else:
untracked = False
return untracked
@LionCog.listener('on_ready')
@log_wrap(action='Init Voice Sessions')
async def initialise(self):