feat(core): implement channel invite model

closes #268
This commit is contained in:
Paul Makles
2023-08-01 15:53:43 +01:00
parent c48109ca66
commit a516c7adcf
10 changed files with 293 additions and 3 deletions

View File

@@ -34,6 +34,33 @@ impl From<crate::Bot> for Bot {
}
}
impl From<crate::Invite> for Invite {
fn from(value: crate::Invite) -> Self {
match value {
crate::Invite::Group {
code,
creator,
channel,
} => Invite::Group {
code,
creator,
channel,
},
crate::Invite::Server {
code,
server,
creator,
channel,
} => Invite::Server {
code,
server,
creator,
channel,
},
}
}
}
impl From<crate::Webhook> for Webhook {
fn from(value: crate::Webhook) -> Self {
Webhook {