diff options
| author | Austin Hellyer <[email protected]> | 2017-01-23 12:35:45 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2017-01-23 12:35:45 -0800 |
| commit | cc3ed770983e4b935860b37c3911cb7adb8b0518 (patch) | |
| tree | 7875202b96c8637be50bdec679c51d02a56c2c49 /src | |
| parent | Make BootInfo/MonitorInfo private (diff) | |
| download | serenity-cc3ed770983e4b935860b37c3911cb7adb8b0518.tar.xz serenity-cc3ed770983e4b935860b37c3911cb7adb8b0518.zip | |
Add GuildId::as_channel_id()
Diffstat (limited to 'src')
| -rw-r--r-- | src/model/guild.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/model/guild.rs b/src/model/guild.rs index 9af9e00..7dd72d9 100644 --- a/src/model/guild.rs +++ b/src/model/guild.rs @@ -1112,6 +1112,12 @@ impl Guild { } impl GuildId { + /// Converts the guild Id into the default channel's Id. + #[inline] + pub fn as_channel_id(&self) -> ChannelId { + ChannelId(self.0) + } + /// Ban a [`User`] from the guild. All messages by the /// user within the last given number of days given will be deleted. /// |