Only compare lower case strings for autocomplete + userconfig command
All checks were successful
Build Heidi Docker image / build-docker (push) Successful in 8s
All checks were successful
Build Heidi Docker image / build-docker (push) Successful in 8s
This commit is contained in:
15
bot.py
15
bot.py
@ -192,6 +192,17 @@ async def on_message(message):
|
|||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
|
# Config Commands --------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@client.tree.command(
|
||||||
|
name="userconfig",
|
||||||
|
description="User-spezifische Heidi-Einstellungen (Heidi merkt sie sich in ihrem riesigen Gehirn)."
|
||||||
|
)
|
||||||
|
async def user_config(interaction: discord.Interaction):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Commands ---------------------------------------------------------------------------------------
|
# Commands ---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@ -298,7 +309,7 @@ async def board_autocomplete(
|
|||||||
boards: List[str] = os.listdir(SOUNDDIR)
|
boards: List[str] = os.listdir(SOUNDDIR)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
Choice(name=board, value=board) for board in boards if board.startswith(current)
|
Choice(name=board, value=board) for board in boards if board.lower().startswith(current.lower())
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -311,7 +322,7 @@ async def sound_autocomplete(
|
|||||||
)
|
)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
Choice(name=sound, value=sound) for sound in sounds if sound.startswith(current)
|
Choice(name=sound, value=sound) for sound in sounds if sound.lower().startswith(current.lower())
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user