gaato/discord/framework does not have a README file
pub(all) suberror InteractionContextError {
MissingInvoker
MissingGuildMemberUser
MissingGuildId
MissingComponentMessage
} derive(Debug)pub(all) suberror ResponseGateError {
AlreadyResponded
InvalidCallback(kind~ : InteractionType, typ~ : InteractionResponseType)
} derive(Debug)pub(all) struct AutocompleteCtx {
client : Client
application_id : Id[ApplicationMarker]
interaction : Interaction
data : CommandData
options : CommandOptions
// private fields
}async fn AutocompleteCtx::suggest(self : AutocompleteCtx, choices : Array[CommandOptionChoice]) -> Unitpub(all) struct CommandCtx {
client : Client
application_id : Id[ApplicationMarker]
interaction : Interaction
data : CommandData
options : CommandOptions
// private fields
}async fn CommandCtx::edit_followup(self : CommandCtx, message_id : Id[MessageMarker], content? : String, clear_content? : Bool, embeds? : Array[Embed], components? : Array[Component], allowed_mentions? : AllowedMentions, files? : Array[FileUpload], keep_attachments? : Array[AttachmentRequest]) -> Messageasync fn CommandCtx::edit_response(self : CommandCtx, content? : String, clear_content? : Bool, embeds? : Array[Embed], components? : Array[Component], allowed_mentions? : AllowedMentions, files? : Array[FileUpload], keep_attachments? : Array[AttachmentRequest], poll? : PollCreateRequest) -> Messageasync fn CommandCtx::followup(self : CommandCtx, content? : String, embeds? : Array[Embed], components? : Array[Component], files? : Array[FileUpload], allowed_mentions? : AllowedMentions, poll? : PollCreateRequest, ephemeral? : Bool) -> Messageasync fn CommandCtx::respond(self : CommandCtx, content? : String, embeds? : Array[Embed], components? : Array[Component], files? : Array[FileUpload], allowed_mentions? : AllowedMentions, ephemeral? : Bool) -> Unitasync fn CommandCtx::show_modal(self : CommandCtx, custom_id~ : String, title~ : String, components~ : Array[Component]) -> Unitpub(all) struct ComponentCtx {
client : Client
application_id : Id[ApplicationMarker]
interaction : Interaction
data : ComponentData
// private fields
}async fn ComponentCtx::edit_followup(self : ComponentCtx, message_id : Id[MessageMarker], content? : String, clear_content? : Bool, embeds? : Array[Embed], components? : Array[Component], allowed_mentions? : AllowedMentions, files? : Array[FileUpload], keep_attachments? : Array[AttachmentRequest]) -> Messageasync fn ComponentCtx::edit_response(self : ComponentCtx, content? : String, clear_content? : Bool, embeds? : Array[Embed], components? : Array[Component], allowed_mentions? : AllowedMentions, files? : Array[FileUpload], keep_attachments? : Array[AttachmentRequest], poll? : PollCreateRequest) -> Messageasync fn ComponentCtx::followup(self : ComponentCtx, content? : String, embeds? : Array[Embed], components? : Array[Component], files? : Array[FileUpload], allowed_mentions? : AllowedMentions, poll? : PollCreateRequest, ephemeral? : Bool) -> Messageasync fn ComponentCtx::respond(self : ComponentCtx, content? : String, embeds? : Array[Embed], components? : Array[Component], files? : Array[FileUpload], allowed_mentions? : AllowedMentions, ephemeral? : Bool) -> Unitasync fn ComponentCtx::show_modal(self : ComponentCtx, custom_id~ : String, title~ : String, components~ : Array[Component]) -> Unitasync fn ComponentCtx::update_message(self : ComponentCtx, content? : String, embeds? : Array[Embed], components? : Array[Component], allowed_mentions? : AllowedMentions) -> Unitpub struct Framework {
// private fields
}fn Framework::autocomplete(self : Framework, command_name : String, handler : async (AutocompleteCtx) -> Unit) -> Frameworkfn Framework::command(self : Framework, spec : CommandSpec, handler : async (CommandCtx) -> Unit) -> Frameworkfn Framework::component(self : Framework, prefix : String, handler : async (ComponentCtx) -> Unit) -> Frameworkasync fn Framework::process_with(self : Framework, interaction : Interaction, gate~ : ResponseGate) -> Boolasync fn Framework::sync_guild(self : Framework, guild_id : Id[GuildMarker]) -> Array[ApplicationCommand]async fn Framework::wait_for_component(self : Framework, custom_id~ : String, timeout_ms? : Int) -> ComponentCtx?pub(all) struct ModalCtx {
client : Client
application_id : Id[ApplicationMarker]
interaction : Interaction
data : ModalData
// private fields
}async fn ModalCtx::edit_followup(self : ModalCtx, message_id : Id[MessageMarker], content? : String, clear_content? : Bool, embeds? : Array[Embed], components? : Array[Component], allowed_mentions? : AllowedMentions, files? : Array[FileUpload], keep_attachments? : Array[AttachmentRequest]) -> Messageasync fn ModalCtx::edit_response(self : ModalCtx, content? : String, clear_content? : Bool, embeds? : Array[Embed], components? : Array[Component], allowed_mentions? : AllowedMentions, files? : Array[FileUpload], keep_attachments? : Array[AttachmentRequest], poll? : PollCreateRequest) -> Messageasync fn ModalCtx::followup(self : ModalCtx, content? : String, embeds? : Array[Embed], components? : Array[Component], files? : Array[FileUpload], allowed_mentions? : AllowedMentions, poll? : PollCreateRequest, ephemeral? : Bool) -> Messageasync fn ModalCtx::respond(self : ModalCtx, content? : String, embeds? : Array[Embed], components? : Array[Component], files? : Array[FileUpload], allowed_mentions? : AllowedMentions, ephemeral? : Bool) -> Unitpub struct ResponseCapture {
// private fields
}pub struct ResponseGate {
// private fields
}fn ResponseGate::ResponseGate(kind : InteractionType, sink : async (InteractionResponse, Array[FileUpload]?) -> Unit) -> ResponseGateasync fn ResponseGate::send(self : ResponseGate, response : InteractionResponse, files? : Array[FileUpload]) -> UnitInstall
Download zipAn experimental Discord library for MoonBit: typed APIs, a native gateway with voice (DAVE E2EE), and JS/serverless HTTP interactions.
Dependencies