From a8a035ebb4216807d5db2f33c156fd81d43cc88c Mon Sep 17 00:00:00 2001
From: tec <tec@ucc.gu.uwa.edu.au>
Date: Mon, 3 Feb 2020 22:46:51 +0800
Subject: [PATCH] Add skeletal verify command

---
 src/main.rs            | 1 +
 src/user_management.rs | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index bb3e41b..0a90746 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -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]);
             }
diff --git a/src/user_management.rs b/src/user_management.rs
index ea1b93b..830f964 100644
--- a/src/user_management.rs
+++ b/src/user_management.rs
@@ -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));
     }
 }
-- 
GitLab