You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need hooks to track voice channel activity but Im unsure on how to to do it.
Right now my link code is setup like this
I have break points on both hooks and in the update code but none of them them are getting triggered
Any ideas?
class Music(discord.ext.commands.Cog):
def __init__(self, bot):
self.bot = bot
if not hasattr(bot, 'redlink'): # This ensures the client isn't overwritten during cog reloads.
self.bot.redlink = redlink.Client(1) # I know this is wrong but ignore it
self.bot.redlink.add_node(...)
redlink.add_event_hook(self.track_hook)
async def on_voice_server_update(self, data):
# the data needs to be transformed before being handed down to
# voice_update_handler
lavalink_data = {
't': 'VOICE_SERVER_UPDATE',
'd': data
}
await self.redlink.voice_update_handler(lavalink_data)
async def on_voice_state_update(self, data):
# the data needs to be transformed before being handed down to
# voice_update_handler
lavalink_data = {
't': 'VOICE_STATE_UPDATE',
'd': data
}
await self.redlink.voice_update_handler(lavalink_data)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I need hooks to track voice channel activity but Im unsure on how to to do it.
Right now my link code is setup like this
I have break points on both hooks and in the update code but none of them them are getting triggered
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions