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
Ash
Discord Bot
Commits
18f228b8
Unverified
Commit
18f228b8
authored
Feb 01, 2020
by
tec
Browse files
Minor reformat to config.rs
parent
65c84bdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.rs
View file @
18f228b8
use
serde
::
Deserialize
;
use
serenity
;
use
std
::
fs
;
use
serde
::
Deserialize
;
use
toml
;
lazy_static!
{
...
...
@@ -14,11 +14,8 @@ lazy_static! {
#[derive(Deserialize)]
pub
struct
UccbotConfig
{
pub
server_id
:
u64
,
// #general
pub
main_channel
:
serenity
::
model
::
id
::
ChannelId
,
// #the-corner
pub
welcome_channel
:
serenity
::
model
::
id
::
ChannelId
,
// #general
pub
announcement_channel
:
serenity
::
model
::
id
::
ChannelId
,
pub
bot_id
:
u64
,
pub
vote_pool_size
:
i8
,
...
...
@@ -37,11 +34,13 @@ pub struct UccbotConfig {
impl
UccbotConfig
{
pub
fn
allowed_reacts
(
&
self
)
->
Vec
<
String
>
{
vec!
(
self
.for_vote
.to_string
(),
self
.against_vote
.to_string
(),
self
.abstain_vote
.to_string
(),
self
.approve_react
.to_string
(),
self
.disapprove_react
.to_string
(),
self
.unsure_react
.to_string
())
vec!
[
self
.for_vote
.to_string
(),
self
.against_vote
.to_string
(),
self
.abstain_vote
.to_string
(),
self
.approve_react
.to_string
(),
self
.disapprove_react
.to_string
(),
self
.unsure_react
.to_string
(),
]
}
}
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