Added curbstomp command
This commit is contained in:
parent
45fb4171f0
commit
0967f5bd8e
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1563,7 +1563,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "shibe-bot"
|
||||
version = "0.4.1"
|
||||
version = "0.4.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dotenvy",
|
||||
|
@ -3,7 +3,7 @@ name = "shibe-bot"
|
||||
description = "A Discord bot written in Rust, using Poise."
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
version = "0.4.1"
|
||||
version = "0.4.2"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Shibe Bot 0.4.1
|
||||
# Shibe Bot 0.4.2
|
||||
|
||||
[](https://github.com/shibedrill/shibe-bot/actions/workflows/rust.yml)
|
||||
[](LICENSE.txt)
|
||||
|
@ -78,6 +78,28 @@ pub async fn whack(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// For your enemies!
|
||||
#[poise::command(slash_command)]
|
||||
pub async fn curbstomp(
|
||||
ctx: Context<'_>,
|
||||
#[description = "The target user"] target: serenity::User,
|
||||
) -> Result<(), Error> {
|
||||
let response: &str = if &target == ctx.author() {
|
||||
"I don't think you can curbstomp yourself."
|
||||
} else if target == **ctx.cache().current_user() {
|
||||
"nice try lol"
|
||||
} else {
|
||||
&format!(
|
||||
"{} made {} eat pavement.",
|
||||
ctx.author(),
|
||||
target
|
||||
)
|
||||
};
|
||||
ctx.say(response).await?;
|
||||
info!("Executed command `whack` successfully");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Magic 8-ball
|
||||
#[poise::command(slash_command)]
|
||||
pub async fn eightball(ctx: Context<'_>) -> Result<(), Error> {
|
||||
|
@ -87,6 +87,7 @@ async fn main() {
|
||||
eightball(),
|
||||
bite(),
|
||||
deer(),
|
||||
curbstomp(),
|
||||
],
|
||||
initialize_owners: true,
|
||||
event_handler: |ctx, event, framework, data| {
|
||||
|
Loading…
Reference in New Issue
Block a user