This commit is contained in:
parent
814a789d9c
commit
a45292611e
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -2711,6 +2711,7 @@ dependencies = [
|
|||||||
"structstruck",
|
"structstruck",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"url",
|
||||||
"vergen",
|
"vergen",
|
||||||
"zip",
|
"zip",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -30,7 +30,8 @@ self-replace = { version = "1.5.0", optional = true }
|
|||||||
zip = { version = "7.2.0", optional = true }
|
zip = { version = "7.2.0", optional = true }
|
||||||
nix = { version = "0.31.1", features = ["process"], optional = true }
|
nix = { version = "0.31.1", features = ["process"], optional = true }
|
||||||
minreq = { version = "2.14.0", features = ["https"], optional = true }
|
minreq = { version = "2.14.0", features = ["https"], optional = true }
|
||||||
|
url = "2.5.8"
|
||||||
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
self-update=["octocrab", "tempfile", "self-replace", "zip", "nix", "minreq"]
|
self-update=["octocrab", "tempfile", "self-replace", "zip", "nix", "minreq"]
|
||||||
|
|||||||
@ -1,6 +1,17 @@
|
|||||||
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};
|
||||||
|
|
||||||
|
const HATE: [&str; 6] = [
|
||||||
|
"kys sloplord",
|
||||||
|
"you post slop stfu",
|
||||||
|
"go generate some hoes",
|
||||||
|
"can we kill this guy",
|
||||||
|
"are you dense",
|
||||||
|
"SHUUUUT UUUPPPPPPPP!!!!"
|
||||||
|
];
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use crate::settings::*;
|
use crate::settings::*;
|
||||||
|
|
||||||
@ -34,9 +45,21 @@ pub async fn event_handler(
|
|||||||
RoleId::new(SLOP_SCOUNDREL_ROLE_ID),
|
RoleId::new(SLOP_SCOUNDREL_ROLE_ID),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap() && !new_message.attachments.is_empty()
|
.unwrap()
|
||||||
{
|
{
|
||||||
new_message.channel_id.say(ctx.http.clone(), "kys").await?;
|
// 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.attachments.is_empty()
|
||||||
|
|| !real_message.embeds.is_empty()
|
||||||
|
|| real_message.content.contains("https://tenor.com/view")
|
||||||
|
{
|
||||||
|
|
||||||
|
let message = {
|
||||||
|
let mut rng = rand::rng();
|
||||||
|
HATE.choose(&mut rng).unwrap().to_string()
|
||||||
|
};
|
||||||
|
new_message.channel_id.say(ctx.http.clone(), message).await?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -40,8 +40,6 @@ use crate::command::{
|
|||||||
util::*,
|
util::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
mod event_handlers;
|
|
||||||
|
|
||||||
// Path at which our settings are stored (currently PWD)
|
// Path at which our settings are stored (currently PWD)
|
||||||
//const SETTINGS_PATH: &str = "settings.json";
|
//const SETTINGS_PATH: &str = "settings.json";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user