Random modifier for insults
All checks were successful
Rust / check (push) Successful in 2m56s

This commit is contained in:
August 2026-05-29 01:40:33 -04:00
parent accc834375
commit 5ef3835e64
Signed by: shibedrill
SSH Key Fingerprint: SHA256:M0m3JW1s38BgO2t0fG146Yxd9OJ2IOqkvCAsuRHQ6Pw

View File

@ -1,7 +1,7 @@
const SLOP_SCOUNDREL_SERVER_ID: u64 = 752667089155915846; const SLOP_SCOUNDREL_SERVER_ID: u64 = 752667089155915846;
const SLOP_SCOUNDREL_ROLE_ID: u64 = 1508961172223951078; const SLOP_SCOUNDREL_ROLE_ID: u64 = 1508961172223951078;
use rand::{self, seq::IndexedRandom}; use rand::{self, Rng, seq::IndexedRandom};
const HATE: [&str; 11] = [ const HATE: [&str; 11] = [
"kys sloplord", "kys sloplord",
@ -62,9 +62,10 @@ pub async fn event_handler(
.message(ctx.http.clone(), new_message.id) .message(ctx.http.clone(), new_message.id)
.await .await
.unwrap(); .unwrap();
if !real_message.attachments.is_empty() if (!real_message.attachments.is_empty()
|| !real_message.embeds.is_empty() || !real_message.embeds.is_empty()
|| real_message.content.contains("https://tenor.com/view") || real_message.content.contains("https://tenor.com/view"))
& rand::rng().random_bool(0.25)
{ {
let message = { let message = {
let mut rng = rand::rng(); let mut rng = rand::rng();