fixed start after move

This commit is contained in:
bacon
2024-03-18 02:08:16 +03:00
parent fff1a5c0c7
commit 76d1625346
3 changed files with 53 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import random
import disnake
from disnake import OptionChoice, Option, OptionType, Member, VoiceState
from disnake import OptionChoice, Option, OptionType, Member, VoiceState, ApplicationCommandInteraction
from disnake.ext import commands
from integral_lib.ListGenerator import ListGenerator
@@ -59,7 +59,17 @@ class Audio(commands.Cog, name='Audio'):
await inter.response.send_message('You`re not in voice', ephemeral=True)
@playaudio.autocomplete('audio')
async def list_to_play(self, inter: disnake.ApplicationCommandInteraction, current: str):
async def list_to_play(self, inter: ApplicationCommandInteraction, current: str):
"""
Asynchronously generates a list of OptionChoices for the given audio files based on the user input.
Parameters:
- inter: disnake.ApplicationCommandInteraction - The interaction context for the command.
- current: str - The current user input to filter the audio file choices.
Returns:
- list[OptionChoice] - A list of OptionChoice objects representing the available audio file choices.
:param current:
:param inter: ApplicationCommandInteraction
"""
current = current.lower()
_dict: dict = {}
for f in ListGenerator('audio'):