refactor: tests for more group routes

This commit is contained in:
Paul Makles committed 2023-09-22 19:04:17 +01:00
1 parent 25ae1555a2
commit 2fa5ac41ac
13 files changed
+607 -69

No files matched your search

+13
View File
@@ -231,3 +231,16 @@ auto_derived!(
pub nsfw: Option<bool>,
}
);
impl Channel {
/// Get a reference to this channel's id
pub fn id(&self) -> &str {
match self {
Channel::DirectMessage { id, .. }
| Channel::Group { id, .. }
| Channel::SavedMessages { id, .. }
| Channel::TextChannel { id, .. }
| Channel::VoiceChannel { id, .. } => id,
}
}
}