public async Task HelpAsync() { // Deletes the invoking message if it's not a direct message. if (!Context.IsPrivate) { await Context.Message.DeleteAsync(); } var embed = new EmbedBuilder { Color = new Color(47, 111, 146), Title = "\u2753 Command Help", Description = $"A command can be invoked by prefixing its name with `{_data.RSettings.ProgramSettings.CommandPrefix}`. To see usage " + $"details for a command, use `{_data.RSettings.ProgramSettings.CommandPrefix}help [command]`.\n\nThe following is a " + "list of available commands:" }; // Sorts modules alphabetically and adds a field for each one. foreach (var module in _commands.Modules.OrderBy(m => m.Name)) { _help.AddModuleField(module, ref embed); } // Replies normally if a direct message fails. try { await Context.User.SendMessageAsync(string.Empty, false, embed.Build()); } catch { await ReplyAsync(string.Empty, false, embed.Build()); } }