From aff6e7f2cf89c3558c16ef00c2aeec69e6011ff9 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sun, 27 Feb 2022 16:14:58 -0800 Subject: [PATCH] Set activity on start, closes #10 --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ae713d8..bbbf9aa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,8 @@ mod commands; use std::{collections::HashSet, env, sync::Arc}; use commands::{challenge::*, kanji::*, meta::*, owner::*}; +use serenity::model::gateway::Activity; +use serenity::model::gateway::ActivityEmoji; use serenity::{ async_trait, client::bridge::gateway::ShardManager, @@ -33,8 +35,10 @@ struct Handler; #[async_trait] impl EventHandler for Handler { - async fn ready(&self, _: Context, ready: Ready) { + async fn ready(&self, ctx: Context, ready: Ready) { info!("Connected as {}", ready.user.name); + let activity = Activity::watching("for new submissions"); + ctx.set_activity(activity).await; } async fn resume(&self, _: Context, _: ResumedEvent) {