pub(super) async fn handle(context: Context, event: Event) {
	if let Err(e) = match event {
		Event::Ready(e) => ready(context, *e).await.into_diagnostic(),
		Event::GuildCreate(e) => guild_create(context, (*e).0).await.into_diagnostic(),
		Event::InteractionCreate(e) => {
			interaction_create(context, *e).await;
			Ok(())
		}
		_ => Ok(()),
	} {
		event!(Level::ERROR, "error occurred: {:?}", e);
	}
}
// these should all be the same caller context, taking a `Context` as the first parameter, and whatever the event content is in the second.
// however, they should return as strict of an error type as possible, using `Infallible` whevever possible (for more optimizations).
these should all be the same caller context, taking a `Context` as the first parameter, and whatever the event content is in the second.
however, they should return as strict of an error type as possible, using `Infallible` whevever possible (for more optimizations).
these should all be the same caller context taking a ` Context ` as the first parameter and whatever the event content is in the second . however they should return as strict of an error type as possible using ` Infallible ` whevever possible ( for more optimizations ) .
pub(super) async fn handle(context: Context, event: Event) {
	if let Err(e) = match event {
		Event::Ready(e) => ready(context, *e).await.into_diagnostic(),
		Event::GuildCreate(e) => guild_create(context, (*e).0).await.into_diagnostic(),
		Event::InteractionCreate(e) => {
			interaction_create(context, *e).await;
			Ok(())
		}
		_ => Ok(()),
	} {
		event!(Level::ERROR, "error occurred: {:?}", e);
	}
}
pub ( super ) async fn handle ( context : Context , event : Event ) { if let Err ( e ) = match event { Event :: Ready ( e ) => ready ( context , * e ) . await . into_diagnostic ( ) , Event :: GuildCreate ( e ) => guild_create ( context , ( * e ) . 0 ) . await . into_diagnostic ( ) , Event :: InteractionCreate ( e ) => { interaction_create ( context , * e ) . await ; Ok ( ( ) ) } _ => Ok ( ( ) ) , } { event ! ( Level ERROR " " e ) ; } }
these should all be the same caller context, taking a `Context` as the first parameter, and whatever the event content is in the second.
these should all be the same caller context taking a ` Context ` as the first parameter and whatever the event content is in the second .
context
Context
event
Event
context
Context
event
Event