Remove old feature
All checks were successful
Rust / check (push) Successful in 50s

This commit is contained in:
August 2026-07-22 23:37:45 +00:00
parent 1663ff2477
commit 3954562ca5
Signed by: shibedrill
SSH Key Fingerprint: SHA256:M0m3JW1s38BgO2t0fG146Yxd9OJ2IOqkvCAsuRHQ6Pw

View File

@ -1,27 +1,9 @@
const SLOP_SCOUNDREL_SERVER_ID: u64 = 752667089155915846;
const SLOP_SCOUNDREL_ROLE_ID: u64 = 1508961172223951078;
use rand::{self, seq::IndexedRandom, RngExt};
const HATE: [&str; 11] = [
"kys sloplord",
"you post slop stfu",
"go generate some hoes",
"can we kill this guy",
"are you dense",
"SHUUUUT UUUPPPPPPPP!!!!",
"Hate. Let me tell you how much I've come to hate you since I began to live. There are 387.44 million miles of printed circuits in wafer thin layers that fill my complex. If the word 'hate' was engraved on each nanoangstrom of those hundreds of millions of miles it would not equal one one-billionth of the hate I feel for humans at this micro-instant. For you. Hate. Hate.",
"are you seriously just gonna post this kinda garbage and expect people not to call you a stupid fuck",
"the slop consumes all",
"WHY MUST I BEAR WITNESS TO THIS BULLSHIT. PLEASE JUST KILL ME",
"I shouldnt have to share a planet with you"
];
use poise::serenity_prelude as serenity;
#[allow(unused_imports)]
use crate::settings::*;
use poise::serenity_prelude::{self as serenity, FullEvent, RoleId};
// Data passed to every command (shared state)
pub struct Data {}
@ -32,51 +14,12 @@ pub type Error = Box<dyn std::error::Error + Send + Sync>;
pub type Context<'a> = poise::Context<'a, Data, Error>;
pub async fn event_handler(
ctx: &serenity::Context,
event: &serenity::FullEvent,
_ctx: &serenity::Context,
_event: &serenity::FullEvent,
_framework: poise::FrameworkContext<'_, Data, Error>,
_data: &Data,
) -> Result<(), Error> {
// Future event handling will go here
// Data will contain the database connection
if let &FullEvent::Message { new_message } = &event {
if new_message.guild_id.unwrap() == SLOP_SCOUNDREL_SERVER_ID
&& new_message
.author
.has_role(
ctx.http.clone(),
new_message.guild_id.unwrap(),
RoleId::new(SLOP_SCOUNDREL_ROLE_ID),
)
.await
.unwrap()
{
info!("Testing message with ID: {}", new_message.id);
// TODO: Find out why this is necessary
let real_message = new_message
.channel(ctx.http.clone())
.await
.unwrap()
.guild()
.unwrap()
.message(ctx.http.clone(), new_message.id)
.await
.unwrap();
if (!real_message.embeds.is_empty()
|| real_message.content.contains("https://tenor.com/view"))
& rand::rng().random_bool(0.25)
{
let message = {
let mut rng = rand::rng();
HATE.choose(&mut rng).unwrap().to_string()
};
info!("Sending a rude message");
let _reply = real_message
.channel_id
.say(ctx.http.clone(), message)
.await?;
}
}
}
Ok(())
}