Trait bindings::Guest
zaun_bot::bindings::Guest · Trait
pub trait Guest { … }Methods
Section titled “Methods”fn init(config: Vec<(String, String)>) -> Registration;Called once per instance start with the bot’s configuration: the keys its manifest
declares in [config], each with the owner’s value or else the declared default (keys
with neither are left out). Secret values are passed like any other.
on_config_change
Section titled “on_config_change”fn on_config_change(config: Vec<(String, String)>);The owner changed the configuration while the bot runs: every value again, as for
init. The instance is not restarted and its commands stay registered.
on_event
Section titled “on_event”fn on_event(event: Event);A subscribed event.
on_interaction
Section titled “on_interaction”fn on_interaction(interaction: Interaction);An application command, component click or modal submit.
on_autocomplete
Section titled “on_autocomplete”fn on_autocomplete(interaction: Interaction) -> Vec<Choice>;Autocomplete: return up to 25 choices for the focused option.
on_timer
Section titled “on_timer”fn on_timer(id: u64, tag: String);A timer fired.
on_voice_event
Section titled “on_voice_event”fn on_voice_event(event: VoiceEvent);Something happened in the bot’s voice stay or player.