示例#1
0
 public LocalWebhookMessage(LocalWebhookMessageBuilder builder)
 {
     Content        = builder.Content;
     Name           = builder.Name;
     AvatarUrl      = builder.AvatarUrl;
     IsTextToSpeech = builder.IsTextToSpeech;
     Attachment     = builder.Attachment;
     Embeds         = builder.Embeds.ToReadOnlyList(x => x.Build());
     Mentions       = builder.Mentions?.Build();
 }
 public Task <RestUserMessage> SendMessageAsync(IEnumerable <LocalAttachment> attachments, string content = null, bool isTTS = false, LocalEmbed embed = null, LocalMentions mentions = null, RestRequestOptions options = null)
 => Client.SendMessageAsync(Id, attachments, content, isTTS, embed, mentions, options);
 public Task <RestUserMessage> SendMessageAsync(Snowflake channelId, IEnumerable <LocalAttachment> attachments, string content = null, bool textToSpeech = false, LocalEmbed embed = null, LocalMentions mentions = null, RestRequestOptions options = null) => ((IRestDiscordClient)RestClient).SendMessageAsync(channelId, attachments, content, textToSpeech, embed, mentions, options);
示例#4
0
        public async Task <RestUserMessage> SendMessageAsync(IEnumerable <LocalAttachment> attachments, string content = null, bool textToSpeech = false, LocalEmbed embed = null, LocalMentions mentions = null, RestRequestOptions options = null)
        {
            var channel = await CreateDmChannelAsync(options).ConfigureAwait(false);

            return(await channel.SendMessageAsync(attachments, content, textToSpeech, embed, mentions, options).ConfigureAwait(false));
        }