Пример #1
0
        public async ValueTask DeleteChannelAsync(
            ulong channelId)
        {
            var response = await RestClient.DeleteAsync(
                DiscordApiRoutes.Channel(channelId))
                           .ConfigureAwait(false);

            HandleErrors(response);
        }
Пример #2
0
        public async ValueTask <DiscordChannelPacket> GetChannelAsync(
            ulong channelId)
        {
            var response = await RestClient.GetAsync(
                DiscordApiRoutes.Channel(channelId))
                           .ConfigureAwait(false);

            HandleErrors(response);
            return(JsonHelper.Deserialize <DiscordChannelPacket>(response.Body));
        }