Skip to content
Snippets Groups Projects
Unverified Commit 28cf81aa authored by tec's avatar tec
Browse files

Provide default (empty) role react mapping

parent 118c332e
No related merge requests found
use indexmap::IndexMap;
use serde::Deserialize;
use serde_yaml;
use serenity::model::id;
use indexmap::IndexMap;
use std::fs;
lazy_static! {
......@@ -49,5 +49,10 @@ pub type ReactRoleMap = IndexMap<String, id::RoleId>;
#[derive(Debug, Deserialize, Clone)]
pub struct ReactionMapping {
pub message: serenity::model::id::MessageId,
#[serde(default = "empty_rr_map")]
pub mapping: ReactRoleMap,
}
fn empty_rr_map() -> ReactRoleMap {
IndexMap::new()
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment