/// <summary> Sends a message to the channel for this webhook with an attachment. </summary>
 /// <returns> Returns the ID of the created message. </returns>
 public Task <ulong> SendFileAsync(Stream stream, string filename, string text, bool isTTS = false,
                                   IEnumerable <Embed> embeds = null, string username = null, string avatarUrl                 = null,
                                   RequestOptions options     = null, bool isSpoiler  = false, AllowedMentions allowedMentions = null)
 => WebhookClientHelper.SendFileAsync(this, stream, filename, text, isTTS, embeds, username, avatarUrl, allowedMentions, options, isSpoiler);
示例#2
0
 /// <summary> Sends a message to the channel for this webhook with an attachment. </summary>
 /// <returns> Returns the ID of the created message. </returns>
 public Task <ulong> SendFileAsync(string filePath, string text, bool isTTS = false,
                                   IEnumerable <Embed> embeds = null, string username = null, string avatarUrl = null, RequestOptions options = null, bool isSpoiler = false)
 => WebhookClientHelper.SendFileAsync(this, filePath, text, isTTS, embeds, username, avatarUrl, options, isSpoiler);
示例#3
0
 /// <summary> Sends a message to the channel for this webhook with an attachment. </summary>
 /// <returns> Returns the ID of the created message. </returns>
 public Task <ulong> SendFileAsync(string filePath, string text, bool isTTS = false,
                                   IEnumerable <Embed> embeds  = null, string username = null, string avatarUrl                 = null,
                                   RequestOptions options      = null, bool isSpoiler  = false, AllowedMentions allowedMentions = null,
                                   MessageComponent components = null)
 => WebhookClientHelper.SendFileAsync(this, filePath, text, isTTS, embeds, username, avatarUrl,
                                      allowedMentions, options, isSpoiler, components);
示例#4
0
 /// <summary> Sends a message to the channel for this webhook with an attachment. </summary>
 /// <returns> Returns the ID of the created message. </returns>
 public Task <ulong> SendFileAsync(FileAttachment attachment, string text, bool isTTS = false,
                                   IEnumerable <Embed> embeds = null, string username                 = null, string avatarUrl = null,
                                   RequestOptions options     = null, AllowedMentions allowedMentions = null, MessageComponent components = null,
                                   MessageFlags flags         = MessageFlags.None)
 => WebhookClientHelper.SendFileAsync(this, attachment, text, isTTS, embeds, username,
                                      avatarUrl, allowedMentions, components, options, flags);
示例#5
0
 /// <summary> Sends a message to the channel for this webhook with an attachment. </summary>
 /// <returns> Returns the ID of the created message. </returns>
 public Task <ulong> SendFileAsync(Stream stream, string filename, string text, bool isTTS = false,
                                   IEnumerable <Embed> embeds  = null, string username    = null, string avatarUrl                 = null,
                                   RequestOptions options      = null, bool isSpoiler     = false, AllowedMentions allowedMentions = null,
                                   MessageComponent components = null, MessageFlags flags = MessageFlags.None, ulong?threadId      = null)
 => WebhookClientHelper.SendFileAsync(this, stream, filename, text, isTTS, embeds, username,
                                      avatarUrl, allowedMentions, options, isSpoiler, components, flags, threadId);