Add check that people can message others in guild.

This commit is contained in:
Paul Makles
2020-04-12 12:16:00 +01:00
parent 2063eeac3d
commit 87e7df02f2
5 changed files with 57 additions and 21 deletions

View File

@@ -50,8 +50,9 @@ impl<'a> rocket::response::Responder<'a> for Permission {
rocket::response::Response::build()
.header(ContentType::JSON)
.sized_body(Cursor::new(format!(
"{{\"error\":\"Lacking {:?} permission.\"}}",
self
"{{\"error\":\"Lacking permission: {:?}.\",\"permission\":{}}}",
self,
self as u32,
)))
.ok()
}