added type hints all over the project, updated mypy to ignore missing types from libraries
This commit is contained in:
@@ -328,7 +328,7 @@ class music(commands.Cog):
|
||||
app_commands.Choice(name="Song", value="song"),
|
||||
app_commands.Choice(name="Queue", value="queue")
|
||||
])
|
||||
async def loop(self, ctx: Context, mode: str = None):
|
||||
async def loop(self, ctx: Context, mode: str | None = None):
|
||||
"""Toggle between loop modes or set a specific mode"""
|
||||
server = ctx.guild
|
||||
|
||||
@@ -391,7 +391,7 @@ class music(commands.Cog):
|
||||
description="Set playback volume",
|
||||
aliases=['vol', 'v'])
|
||||
@app_commands.describe(level="Volume level (0-200%, default shows current)")
|
||||
async def volume(self, ctx: Context, level: int = None):
|
||||
async def volume(self, ctx: Context, level: int | None = None):
|
||||
"""Set or display the current volume"""
|
||||
server = ctx.guild
|
||||
|
||||
@@ -435,7 +435,7 @@ class music(commands.Cog):
|
||||
description="Apply audio effects to playback",
|
||||
aliases=['fx', 'filter'])
|
||||
@app_commands.describe(effect_name="The audio effect to apply (leave empty to see list)")
|
||||
async def effect(self, ctx: Context, effect_name: str = None):
|
||||
async def effect(self, ctx: Context, effect_name: str | None = None):
|
||||
"""Apply or list audio effects"""
|
||||
server = ctx.guild
|
||||
|
||||
|
||||
Reference in New Issue
Block a user