public static async Task Embed(string[] parameters) { SendableMsg msg = new SendableMsg("", false, new Embed() { Title = "Embed title", Description = "Embed description", Fields = new List <EmbedField>() { new EmbedField() { Name = "Param count", Value = parameters.Length.ToString(), IsInline = true }, new EmbedField() { Name = "Other", Value = "More test stuff", IsInline = true }, new EmbedField() { Name = "Other", Value = "New test stuff", IsInline = true } } }); await Messages.Send(msg); }
private Task SendModuleMessage(SendableMsg message) { if (context == null) { return(Task.CompletedTask); } return(ModularUtil.SendMessage(context, message)); }
public static async Task <IUserMessage> SendMessage(ICommandContext context, SendableMsg message) { if (message.Filepath != null) { return(await context.Channel.SendFileAsync(message.Filepath, message.Text, message.isTTS, Convert(message.MsgEmbed, context), null, message.Spoilered)); } return(await context.Channel.SendMessageAsync(message.Text, message.isTTS, Convert(message.MsgEmbed, context))); }
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously public static async Task Send(SendableMsg message) { OnMessageSend?.Invoke(message); return; }