Restrict bots from creating servers, groups, acking messages, and making friends.

This commit is contained in:
Paul
2021-08-11 20:16:11 +01:00
parent 084d71f050
commit 93610ebbc3
16 changed files with 65 additions and 5 deletions

View File

@@ -19,6 +19,10 @@ pub struct Options {
#[post("/settings/set?<options..>", data = "<data>")]
pub async fn req(user: User, data: Json<Data>, options: Options) -> Result<()> {
if user.bot.is_some() {
return Err(Error::IsBot)
}
let data = data.into_inner();
let current_time = Utc::now().timestamp_millis();
let timestamp = if let Some(timestamp) = options.timestamp {