Files
payphone/src/framework/interactions/message_command.rs
T

18 lines
548 B
Rust

use crate::framework::interactions::{InteractionError, context::InteractionContext};
use async_trait::async_trait;
use std::fmt::Debug;
use twilight_model::gateway::payload::incoming::InteractionCreate;
#[async_trait]
pub trait MessageCommand<T>: Send + Sync + Debug {
fn name(&self) -> &'static str;
fn description(&self) -> &'static str {
"A message context menu command duh."
}
async fn execute(
&self,
ctx: InteractionContext<T>,
target_message_id: u64,
) -> Result<(), InteractionError>;
}