Skip to content
Snippets Groups Projects
Commit 4b917eee authored by Stephen D's avatar Stephen D
Browse files

react with emojis to show run status

parent 805f9cb4
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,11 @@ impl EventHandler for Handler {
.unwrap();
}
"RUN" => {
let thinking_react = match ReactionType::from_str("🤔") {
Ok(react) => msg.react(&ctx, react).await.ok(),
Err(_) => None,
};
let code = self.programs.lock().unwrap()[&msg.author.id].stringify();
let io = DiscordIO::new();
......@@ -169,6 +174,15 @@ impl EventHandler for Handler {
if let Some(e) = errors {
msg.channel_id.say(&ctx, e).await.unwrap();
if let Ok(react) = ReactionType::from_str("❌") {
let _ = msg.react(&ctx, react).await;
}
} else if let Ok(react) = ReactionType::from_str("✅") {
let _ = msg.react(&ctx, react).await;
}
if let Some(t) = thinking_react {
let _ = t.delete(&ctx).await;
}
}
"LIST" => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment