From cb7f296ceff19447dfc273fec19218d9530df8f4 Mon Sep 17 00:00:00 2001 From: Benjamin Scherer Date: Sun, 23 Aug 2020 23:36:36 -0600 Subject: [PATCH] add activity Added an activity that suggests how to get help using the bot for new users. --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd60f12..b250c04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -407,7 +407,7 @@ dependencies = [ [[package]] name = "highlights" -version = "1.0.0-beta.1" +version = "1.0.0-beta.2" dependencies = [ "chrono", "dotenv", diff --git a/Cargo.toml b/Cargo.toml index 7f1bfc9..2bd0bcf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "highlights" -version = "1.0.0-beta.1" +version = "1.0.0-beta.2" authors = ["Benjamin Scherer "] repository = "https://github.com/ThatsNoMoon/highlights" license = "OSL-3.0" diff --git a/src/main.rs b/src/main.rs index 7779781..f347614 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,6 +101,10 @@ impl EventHandler for Handler { init_log_channel_id(&ctx).await; + let username = ctx.cache.current_user_field(|u| u.name.clone()).await; + + ctx.set_activity(Activity::listening(&format!("@{} help", username))).await; + log::info!("Ready to highlight!"); } }