I'm working on a discord bot in python, and I have made a music function for it that works pretty well. However, when I try to give the bot the "leave" command as an "everyone" user on my alt, it tells me that I am missing the "Manage Server" permissions to run the command to stop and leave. Any way I can fix this?
Part 1 of stop and leave command:
self.songs.clear()
if self.voice:
await self.voice.disconnect()
self.voice = None
Part 2
@commands.command(name='leave', aliases=['disconnect'])
@commands.has_permissions(manage_guild=True)
async def _leave(self, ctx: commands.Context):
"""Clears the queue and leaves the voice channel."""
if not ctx.voice_state.voice:
return await ctx.send('Join a VC or I will spank you.')
await ctx.voice_state.stop()
del self.voice_states[ctx.guild.id]