Readonly
botReadonly
commandsReadonly
default_Readonly
default_Whether this command is enabled by default when the application is added to a guild.
Use SharedSlashCommand.setDefaultMemberPermissions or SharedSlashCommand.setDMPermission instead.
Readonly
descriptionThe description of this command.
Optional
Readonly
description_The description localizations of this command.
Readonly
dm_Indicates whether the command is available in direct messages with the application.
Readonly
grReadonly
nameThe name of this command.
Optional
Readonly
name_The name localizations of this command.
Readonly
nsfwWhether this command is NSFW.
Readonly
optionsThe options of this command.
Adds an attachment option.
A function that returns an option builder or an already built builder
Adds a mentionable option.
A function that returns an option builder or an already built builder
Adds a new subcommand to this command.
A function that returns a subcommand builder or an already built builder
Adds a new subcommand group to this command.
A function that returns a subcommand group builder or an already built builder
Parses the given ChatInputCommandInteraction.
The ChatInputCommandInteraction to parse.
The route and payload to send to the Gradio endpoint.
Sets if the command is available in direct messages with the application.
Whether the command should be enabled in direct messages
By default, commands are visible. This method is only for global commands.
https://discord.com/developers/docs/interactions/application-commands#permissions
Sets the default permissions a member should have in order to run the command.
The permissions bit field to set
You can set this to '0'
to disable the command by default.
https://discord.com/developers/docs/interactions/application-commands#permissions
Sets whether the command is enabled by default when the application is added to a guild.
Whether or not to enable this command by default
If set to false
, you will have to later PUT
the permissions for this command.
https://discord.com/developers/docs/interactions/application-commands#permissions
Use SharedSlashCommand.setDefaultMemberPermissions or SharedSlashCommand.setDMPermission instead.
Sets a description localization for this command.
The locale to set
The localized description for the given locale
Sets the description localizations for this command.
The object of localized descriptions to set
Sets a name localization for this command.
The locale to set
The localized name for the given locale
Sets the name localizations for this command.
The object of localized names to set
Static
fromCreates a new instance of GradioBot from a Gradio Client instance, Hugging Face Space, or a Gradio server URL.
The Gradio Client instance, Hugging Face Spaces, or the Gradio server URL.
Optional
bot: Client<boolean>The Discord Client instance used to register and respond to commands.
Optional
options: AdaptOptionsThe options for adapting the Gradio API.
The set of permissions represented as a bit set for the command.