mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 21:47:02 +00:00
Merge branch 'master' into feat/embed_improvements
This commit is contained in:
@@ -43,6 +43,9 @@ pub enum Error {
|
||||
UnknownServer,
|
||||
InvalidRole,
|
||||
Banned,
|
||||
TooManyServers{
|
||||
max: usize,
|
||||
},
|
||||
|
||||
// ? Bot related errors.
|
||||
ReachedMaximumBots,
|
||||
@@ -111,6 +114,7 @@ impl<'r> Responder<'r, 'static> for Error {
|
||||
Error::UnknownServer => Status::NotFound,
|
||||
Error::InvalidRole => Status::NotFound,
|
||||
Error::Banned => Status::Forbidden,
|
||||
Error::TooManyServers { .. } => Status::Forbidden,
|
||||
|
||||
Error::ReachedMaximumBots => Status::BadRequest,
|
||||
Error::IsBot => Status::BadRequest,
|
||||
|
||||
@@ -66,6 +66,8 @@ lazy_static! {
|
||||
env::var("REVOLT_MAX_BOT_COUNT").unwrap_or_else(|_| "5".to_string()).parse().unwrap();
|
||||
pub static ref MAX_EMBED_COUNT: usize =
|
||||
env::var("REVOLT_MAX_EMBED_COUNT").unwrap_or_else(|_| "5".to_string()).parse().unwrap();
|
||||
pub static ref MAX_SERVER_COUNT: usize =
|
||||
env::var("REVOLT_MAX_SERVER_COUNT").unwrap_or_else(|_| "100".to_string()).parse().unwrap();
|
||||
pub static ref EARLY_ADOPTER_BADGE: i64 =
|
||||
env::var("REVOLT_EARLY_ADOPTER_BADGE").unwrap_or_else(|_| "0".to_string()).parse().unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user