Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
Discord Bot
Commits
28cf81aa
Unverified
Commit
28cf81aa
authored
Feb 05, 2020
by
tec
Browse files
Provide default (empty) role react mapping
parent
118c332e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.rs
View file @
28cf81aa
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
()
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment