diff options
| author | Nathan Perry <avaglir@gmail.com> | 2019-03-10 01:43:40 -0500 |
|---|---|---|
| committer | Nathan Perry <avaglir@gmail.com> | 2019-03-10 01:43:40 -0500 |
| commit | c39a52e635e0f66c34e8ec013c76b4ffa0935fdc (patch) | |
| tree | 0bae0d11cb979c5ff1f969de90f7003be19a1622 | |
| parent | 364b1f9b216574c32d2aa0a699553e6328824704 (diff) | |
updategaem: fix bug re: whose steam account is used
updategaem: open command to everyone
updategaem: improve messages
| -rw-r--r-- | src/game.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/game.rs b/src/game.rs index 5911ba0..e98683f 100644 --- a/src/game.rs +++ b/src/game.rs @@ -61,7 +61,6 @@ pub fn register(s: StandardFramework) -> StandardFramework { .command("updategame", |c| c .known_as("updategaem") .desc("update your games on the spreadsheet") - .owners_only(true) .exec(updategaem) ) } @@ -410,7 +409,7 @@ fn updategaem(_ctx: &mut Context, msg: &Message, mut args: Args) -> Result<()> { None => return send(msg.channel_id, "WHO THE FUCK ARE YE", msg.tts), }; - let steam_id = match STEAM_MAP.get(&msg.author.id) { + let steam_id = match STEAM_MAP.get(&user) { Some(u) => u, None => return send(msg.channel_id, "WHO ARE YE ON STEAM", msg.tts), }; @@ -489,11 +488,10 @@ fn updategaem(_ctx: &mut Context, msg: &Message, mut args: Args) -> Result<()> { .join("\n"); if found_games.len() > 0 { - send(msg.channel_id, &format!("you own {} games that you should add to the list:\n{}", + send(msg.channel_id, &format!("{} games owned on steam that are missing from the list:\n{}", found_games.chars().filter(|x| *x == '\n').count() + 1, found_games), msg.tts) } else { - send(msg.channel_id, "you're up to date", msg.tts) + send(msg.channel_id, "up to date", msg.tts) } - }
\ No newline at end of file |
