Files
handmade-revolt-backend/src/notifications/mod.rs
2020-04-13 16:04:41 +01:00

22 lines
447 B
Rust

pub mod events;
pub mod pubsub;
pub mod state;
pub mod ws;
pub fn send_message<U: Into<Option<Vec<String>>>, G: Into<Option<String>>>(
users: U,
guild: G,
data: events::Notification,
) -> bool {
let users = users.into();
let guild = guild.into();
if pubsub::send_message(users.clone(), guild.clone(), data) {
state::send_message(users, guild, "bruh".to_string());
true
} else {
false
}
}