Renamed commands/Command to plugin/Plugin.
This commit is contained in:
18
src/plugin.rs
Normal file
18
src/plugin.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum Plugin {
|
||||
SendMessage { channel: String, message: String },
|
||||
}
|
||||
|
||||
impl Display for Plugin {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::SendMessage { channel, message } => {
|
||||
write!(f, "[{channel}]: {message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user