i can't get my bot to add roles. what am i doing wrong here?
class MyClient(discord.Client):
async def on_voice_state_update(member, before, after):
role = get(member.server.roles, name="babbelaar")
if after.channel is None:
member.add_roles([role.id])
else:
member.remove_roles([role.id])
i want a user that joins a voice channel to get a certain role, and that role to be removed after the user leaves the voice channel