aboutsummaryrefslogtreecommitdiff
path: root/src/modules/plugins/set_bot_game.rs
blob: 44ab51ad3cdfb5ab43bb831842ccd49ea0d7da8c (plain) (blame)
1
2
3
4
5
6
7
8
9
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
    };
}