diff options
| author | Fuwn <[email protected]> | 2020-11-01 00:24:43 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2020-11-01 00:24:43 -0700 |
| commit | 85e486db6237870b585f07cfd4ea26af4a65bf85 (patch) | |
| tree | e09d4ba0a498cdca612cc5e7ccf7fd2379fefb53 /src/modules/plugins/set_bot_game.rs | |
| parent | feat (desc) (diff) | |
| download | dep-core-next-85e486db6237870b585f07cfd4ea26af4a65bf85.tar.xz dep-core-next-85e486db6237870b585f07cfd4ea26af4a65bf85.zip | |
feat (desc)
feat:
- implement somewhat ok but not done version of lavalink
- new macros
- plugin system
- random hi plugin
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 + }; +} |