Add role hoisting / ranking.

Add bot creation for #8.
This commit is contained in:
Paul
2021-08-11 20:04:22 +01:00
parent e70f848f21
commit 084d71f050
18 changed files with 282 additions and 29 deletions

View File

@@ -17,10 +17,22 @@ pub enum WebSocketError {
AlreadyAuthenticated,
}
#[derive(Deserialize, Debug)]
pub struct BotAuth {
pub token: String
}
#[derive(Deserialize, Debug)]
#[serde(untagged)]
pub enum AuthType {
User(Session),
Bot(BotAuth)
}
#[derive(Deserialize, Debug)]
#[serde(tag = "type")]
pub enum ServerboundNotification {
Authenticate(Session),
Authenticate(AuthType),
BeginTyping { channel: String },
EndTyping { channel: String },
}