Skip to content

Commit

Permalink
Add self_message to rp_command!()
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinegb committed Apr 9, 2024
1 parent c5af9b0 commit 5a93beb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type Context<'a> = poise::Context<'a, UserData, Error>;
/// context_menu_name: literal,
/// description: literal,
/// user_description: literal,
/// self_message: literal,
/// [ message..: literal ],
/// );
/// ```
Expand All @@ -48,6 +49,7 @@ macro_rules! rp_command {
$context_menu_name:literal,
$description:literal,
$user_description:literal,
$self_message:literal,
[$($message:literal),+$(,)?]$(,)?
) => {
#[doc = $description]
Expand All @@ -69,7 +71,9 @@ macro_rules! rp_command {
];
let picked_message;

{
if (user.id == ctx.framework().bot_id) {
picked_message = $self_message;
} else {
let mut rng = thread_rng();

picked_message = messages
Expand All @@ -90,6 +94,7 @@ rp_command!(
"Boop",
"Boops a being :3c",
"Your victim >:3",
"I have been booped by {a} <:floofOwO:1226944711768412280>",
[
"{a} booped {b}!!! <:floofOwO:1226944711768412280>",
"{b} just got booped by {a}?? <a:afloofLoad:1227015489792905360>",
Expand All @@ -104,6 +109,7 @@ rp_command!(
"Gnaw Bones",
"Embrace the bobin within us all and gnaw on one's bones",
"The subject of today's gnawing",
"GRAAAHH {a} STOP GNAWING MY BONES GET OFF HELP <:floofScared:1226944726096285777>",
[
"{a} is gnawing on {b}'s bones <:floofNom:1226944708366831637>",
"{a} craves the bones of {b} <:floofNom:1226944708366831637>",
Expand All @@ -117,6 +123,7 @@ rp_command!(
"Bite",
"Express a wide range of emotions via- your teeth in somebody's skin",
"The skin-haver in question",
"Help please {a}'s biting me <:floofOwO:1226944711768412280>",
[
"D- did {a} just bite {b}?? <:floofOwO:1226944711768412280>",
"Awww, {a} gave {b} a love bite... I think- actually, it's hard to say <:floofTired:1226944734640078878>",
Expand All @@ -130,6 +137,7 @@ rp_command!(
"Meow At",
"You know what you are",
"Get their attention",
"Hm? What's that {a}? Oh I see... mhm... okay, okay, I understand <:floofCat:1226944674988687491>",
[
"Uhh, {a} just meowed at {b} <:floofWhat:1226944914315804683>",
"{a} is a furry and they want {b} to know it <:floofMischief:1226944697579077692>",
Expand All @@ -147,6 +155,7 @@ rp_command!(
"Murder",
"MURRRRRDEERRRRRRRRRRR",
"KILL THEM KILL THEM KILL THEM >:D",
"GAH {a} HAS A KNIFE AND IS RUNNING AT ME WAAAA <:floofScared:1226944726096285777>",
[
"{a} crept up behind {b} and murdered them!!! <:floofOwO:1226944711768412280>",
"{a} just pulled out a bazooka and blew {b} up!?!? <:floofOwO:1226944711768412280>",
Expand Down

0 comments on commit 5a93beb

Please sign in to comment.