Exemplo n.º 1
0
        public static async Task <DiscordDefaultWebhook> CreateWebhookAsync(this DiscordClient client, ulong channelId, DiscordWebhookProperties properties)
        {
            properties.ChannelId = channelId;
            DiscordDefaultWebhook hook = (await client.HttpClient.PostAsync($"/channels/{channelId}/webhooks", properties)).Deserialize <DiscordDefaultWebhook>().SetClient(client);

            hook.Modify(properties);
            return(hook);
        }
Exemplo n.º 2
0
 private void Update(DiscordDefaultWebhook hook)
 {
     Token = hook.Token;
     base.Update(hook);
 }