mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 21:47:02 +00:00
Restrict bots from creating servers, groups, acking messages, and making friends.
This commit is contained in:
@@ -46,6 +46,7 @@ pub enum Error {
|
||||
|
||||
// ? Bot related errors.
|
||||
ReachedMaximumBots,
|
||||
IsBot,
|
||||
|
||||
// ? General errors.
|
||||
TooManyIds,
|
||||
@@ -102,6 +103,7 @@ impl<'r> Responder<'r, 'static> for Error {
|
||||
Error::Banned => Status::Forbidden,
|
||||
|
||||
Error::ReachedMaximumBots => Status::BadRequest,
|
||||
Error::IsBot => Status::BadRequest,
|
||||
|
||||
Error::FailedValidation { .. } => Status::UnprocessableEntity,
|
||||
Error::DatabaseError { .. } => Status::InternalServerError,
|
||||
|
||||
Reference in New Issue
Block a user