public static TMessage AddEmbed <TMessage>(this TMessage message, LocalEmbed embed) where TMessage : LocalMessageBase { Guard.IsNotNull(embed); message._embeds.Add(embed); return(message); }
public static TMessage AddEmbed <TMessage>(this TMessage message, LocalEmbed embed) where TMessage : LocalMessageBase { if (embed == null) { throw new ArgumentNullException(nameof(embed)); } message._embeds.Add(embed); return(message); }
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);
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)); }