autocomplete printer delete
This commit is contained in:
parent
b7ce1a2162
commit
bc94b521e5
1 changed files with 6 additions and 4 deletions
|
|
@ -3,8 +3,10 @@ extends RefCounted
|
||||||
#func on_ready(main, bot: DiscordBot) -> void:
|
#func on_ready(main, bot: DiscordBot) -> void:
|
||||||
# pass
|
# pass
|
||||||
#
|
#
|
||||||
#func on_autocomplete(main, bot: DiscordBot, interaction: DiscordInteraction, options: Array) -> void:
|
func on_autocomplete(main, bot: DiscordBot, interaction: DiscordInteraction, options: Array) -> void:
|
||||||
# pass
|
print(options)
|
||||||
|
interaction.respond_autocomplete(Library.printer_choies())
|
||||||
|
pass
|
||||||
|
|
||||||
func execute(main, bot: DiscordBot, interaction: DiscordInteraction, options: Array) -> void:
|
func execute(main, bot: DiscordBot, interaction: DiscordInteraction, options: Array) -> void:
|
||||||
print(options)
|
print(options)
|
||||||
|
|
@ -32,7 +34,7 @@ var data = ApplicationCommand.new()\
|
||||||
.add_option(ApplicationCommand.string_option("name", "the printers name",
|
.add_option(ApplicationCommand.string_option("name", "the printers name",
|
||||||
{
|
{
|
||||||
"required":true,
|
"required":true,
|
||||||
|
"autocomplete":true,
|
||||||
"choices" : Library.printer_choies()
|
#"choices" : Library.printer_choies()
|
||||||
}))\
|
}))\
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue