Skip to content

Commit

Permalink
reply
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Apr 23, 2024
1 parent 34d305f commit d01ce5c
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/commands/game_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,19 @@ pub async fn game_support(ctx: Context<'_>,

match resp.status() {
StatusCode::OK => {
ctx.reply(message).await?;
if let Context::Prefix(prefix) = ctx {
match prefix.msg.clone().referenced_message {
Some(parent) => {
parent.reply(&ctx, message).await?;
prefix.msg.delete(ctx).await?;
},
None => {
ctx.reply(message).await?;
}
}
} else {
ctx.reply(message).await?;
}
},
StatusCode::NOT_FOUND => {
ctx.reply("Hmm, seems that game isn't in our docs.").await?;
Expand All @@ -29,19 +41,5 @@ pub async fn game_support(ctx: Context<'_>,
None => {}
}

// if let Context::Prefix(prefix) = ctx {
// match prefix.msg.clone().referenced_message {
// Some(parent) => {
// parent.reply(&ctx, message).await?;
// prefix.msg.delete(ctx).await?;
// },
// None => {
// ctx.reply(message).await?;
// }
// }
// } else {
// ctx.reply(message).await?;
// }

Ok(())
}

0 comments on commit d01ce5c

Please sign in to comment.