discord_gleam/http/applications

Values

pub fn register_global_command(
  token: String,
  client_id: snowflake.Snowflake(snowflake.Application),
  command: slash_command.SlashCommand,
) -> Result(Nil, @internal DiscordError)

Register a new global slash command

pub fn register_guild_command(
  token: String,
  client_id: snowflake.Snowflake(snowflake.Application),
  guild_id: snowflake.Snowflake(snowflake.Guild),
  command: slash_command.SlashCommand,
) -> Result(Nil, @internal DiscordError)

Register a new guild-specific slash command

pub fn wipe_global_commands(
  token: String,
  client_id: snowflake.Snowflake(snowflake.Application),
) -> Result(Nil, @internal DiscordError)

Wipes the global commands for the bot

pub fn wipe_guild_commands(
  token: String,
  client_id: snowflake.Snowflake(snowflake.Application),
  guild_id: snowflake.Snowflake(snowflake.Guild),
) -> Result(Nil, @internal DiscordError)

Wipes the guild commands for the bot

Search Document