📁
KSoft.rs
  • KSoft.rs
  • Shared types
  • Images
    • Types
    • Endpoints
  • Bans
    • Types
    • Endpoints
  • Kumo
    • Types
    • Endpoints
  • Music
    • Types
    • Endpoints
  • Events
    • Types
    • Examples
Powered by GitBook
On this page
  • EventHandler
  • Asynchronous
  • Blocking

Was this helpful?

  1. Events

Types

EventHandler

Trait used to emit the server events

Asynchronous

#[async_trait]
trait EventHandler: Send + Sync + 'static {
    ///Event triggered every 5 minutes if there is any ban update
    async fn ban_updated(&self, _data: Vec<BanUpdate>) {}
}

Blocking

trait EventHandler: Send + Sync + 'static {
    ///Event triggered every 5 minutes if there is any ban update
    fn ban_updated(&self, _data: Vec<BanUpdate>) {}
}
PreviousEndpointsNextExamples

Last updated 4 years ago

Was this helpful?