diff options
Diffstat (limited to 'src/modules/plugins/set_bot_game.rs')
| -rw-r--r-- | src/modules/plugins/set_bot_game.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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 + }; +} |