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
a8a035eb
Unverified
Commit
a8a035eb
authored
Feb 03, 2020
by
tec
Browse files
Add skeletal verify command
parent
5de793cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main.rs
View file @
a8a035eb
...
...
@@ -51,6 +51,7 @@ impl EventHandler for Handler {
println!
(
"{:#?}"
,
msg
.content
);
}
"register"
=>
user_management
::
Commands
::
register
(
ctx
,
msg
.clone
(),
message_content
[
1
]),
"verify"
=>
user_management
::
Commands
::
verify
(
ctx
,
msg
.clone
(),
message_content
[
1
]),
"join"
=>
{
user_management
::
Commands
::
join
(
ctx
,
msg
.clone
(),
message_content
[
1
]);
}
...
...
src/user_management.rs
View file @
a8a035eb
...
...
@@ -59,6 +59,12 @@ impl Commands {
);
return
;
}
// token stuff
e!
(
"Error deleting register message: {:?}"
,
msg
.delete
(
ctx
));
}
pub
fn
verify
(
ctx
:
Context
,
msg
:
Message
,
content
:
&
str
)
{
let
token
=
content
;
// if token is valid
e!
(
"Unable to get member: {:?}"
,
serenity
::
model
::
id
::
GuildId
(
CONFIG
.server_id
)
...
...
@@ -96,6 +102,5 @@ impl Commands {
);
})
);
e!
(
"Error deleting register message: {:?}"
,
msg
.delete
(
ctx
));
}
}
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