discord_gleam/ws/packets/interaction_create
Types
pub type InteractionCommand {
InteractionCommand(type_: Int, name: String, id: Snowflake)
}
Constructors
-
InteractionCommand(type_: Int, name: String, id: Snowflake)
pub type InteractionCreate {
InteractionCreate(
t: String,
s: Int,
op: Int,
d: InteractionCreateData,
)
}
Constructors
-
InteractionCreate( t: String, s: Int, op: Int, d: InteractionCreateData, )
pub type InteractionCreateData {
InteractionCreateData(
token: String,
member: InteractionCreateMember,
id: Snowflake,
guild_id: Snowflake,
data: InteractionCommand,
channel_id: Snowflake,
)
}
Constructors
-
InteractionCreateData( token: String, member: InteractionCreateMember, id: Snowflake, guild_id: Snowflake, data: InteractionCommand, channel_id: Snowflake, )
pub type InteractionCreateMember {
InteractionCreateMember(user: InteractionUser)
}
Constructors
-
InteractionCreateMember(user: InteractionUser)
pub type InteractionOption {
InteractionOption(
name: String,
type_: Int,
description: String,
)
}
Constructors
-
InteractionOption(name: String, type_: Int, description: String)
pub type InteractionUser {
InteractionUser(username: String, id: Snowflake)
}
Constructors
-
InteractionUser(username: String, id: Snowflake)
Functions
pub fn string_to_data(
encoded: String,
) -> Result(InteractionCreate, String)