Unnecessary async function

`is_privileged()` function does not contain any asynchronous code therefore being an async function does not effect performance.
And it's been called across the code without the `await` keyword causing `RuntimeWarning: coroutine 'Music.is_privileged' was never awaited` error.
This commit is contained in:
SCARTAL 2023-04-21 17:54:21 +03:30 committed by GitHub
parent 77a7246b6a
commit c75cdc60bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ class Music(commands.Cog):
await self.pomice.create_node( await self.pomice.create_node(
bot=self.bot, bot=self.bot,
host="127.0.0.1", host="127.0.0.1",
port=3030, port="3030",
password="youshallnotpass", password="youshallnotpass",
identifier="MAIN", identifier="MAIN",
) )
@ -119,7 +119,7 @@ class Music(commands.Cog):
return required return required
async def is_privileged(self, ctx: commands.Context): def is_privileged(self, ctx: commands.Context):
"""Check whether the user is an Admin or DJ.""" """Check whether the user is an Admin or DJ."""
player: Player = ctx.voice_client player: Player = ctx.voice_client