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]]
|
[[package]]
|
||||||
name = "shibe-bot"
|
name = "shibe-bot"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"dotenvy",
|
"dotenvy",
|
||||||
|
@ -3,7 +3,7 @@ name = "shibe-bot"
|
|||||||
description = "A Discord bot written in Rust, using Poise."
|
description = "A Discord bot written in Rust, using Poise."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
build = "build.rs"
|
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)
|
[](https://github.com/shibedrill/shibe-bot/actions/workflows/rust.yml)
|
||||||
[](LICENSE.txt)
|
[](LICENSE.txt)
|
||||||
|
@ -78,6 +78,28 @@ pub async fn whack(
|
|||||||
Ok(())
|
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
|
/// Magic 8-ball
|
||||||
#[poise::command(slash_command)]
|
#[poise::command(slash_command)]
|
||||||
pub async fn eightball(ctx: Context<'_>) -> Result<(), Error> {
|
pub async fn eightball(ctx: Context<'_>) -> Result<(), Error> {
|
||||||
|
@ -87,6 +87,7 @@ async fn main() {
|
|||||||
eightball(),
|
eightball(),
|
||||||
bite(),
|
bite(),
|
||||||
deer(),
|
deer(),
|
||||||
|
curbstomp(),
|
||||||
],
|
],
|
||||||
initialize_owners: true,
|
initialize_owners: true,
|
||||||
event_handler: |ctx, event, framework, data| {
|
event_handler: |ctx, event, framework, data| {
|
||||||
|
Loading…
Reference in New Issue
Block a user