forked from jmug/stoatchat
Restrict bots from creating servers, groups, acking messages, and making friends.
This commit is contained in:
@@ -7,6 +7,10 @@ use mongodb::options::UpdateOptions;
|
||||
|
||||
#[put("/<target>/ack/<message>")]
|
||||
pub async fn req(user: User, target: Ref, message: Ref) -> Result<()> {
|
||||
if user.bot.is_some() {
|
||||
return Err(Error::IsBot)
|
||||
}
|
||||
|
||||
let target = target.fetch_channel().await?;
|
||||
|
||||
let perm = permissions::PermissionCalculator::new(&user)
|
||||
|
||||
Reference in New Issue
Block a user