From 85e486db6237870b585f07cfd4ea26af4a65bf85 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 1 Nov 2020 00:24:43 -0700 Subject: feat (desc) feat: - implement somewhat ok but not done version of lavalink - new macros - plugin system - random hi plugin --- src/modules/plugins/set_bot_game.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/modules/plugins/set_bot_game.rs (limited to 'src/modules/plugins/set_bot_game.rs') diff --git a/src/modules/plugins/set_bot_game.rs b/src/modules/plugins/set_bot_game.rs new file mode 100644 index 0000000..44ab51a --- /dev/null +++ b/src/modules/plugins/set_bot_game.rs @@ -0,0 +1,10 @@ +use serenity::prelude::Context; +use serenity::model::gateway::{Ready, Game}; +use std::env; + +pub fn on_message(ctx: &Context, _: &Ready) { + match env::var("BOT_GAME") { + Ok(val) => ctx.set_game(Game::playing(&val)), + Err(_) => return + }; +} -- cgit v1.2.3