pub struct ComponentInteractionContext<T: Clone + Send + Sync> {
pub meta: Metadata,
pub application_id: Id<ApplicationMarker>,
pub services: Arc<T>,
pub client: Arc<Client>,
pub event: InteractionCreate,
pub interaction: MessageComponentInteractionData,
}
Fields§
§meta: Metadata
§application_id: Id<ApplicationMarker>
§services: Arc<T>
§client: Arc<Client>
§event: InteractionCreate
§interaction: MessageComponentInteractionData
Implementations§
Source§impl<T: Clone + Send + Sync> ComponentInteractionContext<T>
impl<T: Clone + Send + Sync> ComponentInteractionContext<T>
pub fn from_context( ctx: Context<T>, meta: Metadata, event: InteractionCreate, interaction: MessageComponentInteractionData, ) -> Self
pub fn interaction(&self) -> InteractionClient<'_>
pub async fn guild(&self) -> Result<Option<Guild>, Error>
pub async fn response( &self, response: InteractionResponse, ) -> Result<Response<EmptyBody>, Error>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ComponentInteractionContext<T>
impl<T> !RefUnwindSafe for ComponentInteractionContext<T>
impl<T> Send for ComponentInteractionContext<T>
impl<T> Sync for ComponentInteractionContext<T>
impl<T> Unpin for ComponentInteractionContext<T>
impl<T> !UnwindSafe for ComponentInteractionContext<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more