Port some more commands, mostly for embeds

This commit is contained in:
Ske
2020-12-25 12:56:46 +01:00
parent 9d919d687b
commit 2e0c30eb5d
13 changed files with 140 additions and 135 deletions

View File

@@ -3,17 +3,13 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DSharpPlus;
using DSharpPlus.Entities;
using Myriad.Builders;
using Myriad.Cache;
using Myriad.Extensions;
using Myriad.Types;
using PluralKit.Core;
using Permissions = DSharpPlus.Permissions;
namespace PluralKit.Bot
{
public class ServerConfig
@@ -183,15 +179,15 @@ namespace PluralKit.Bot
newValue = false;
else
{
var eb = new DiscordEmbedBuilder()
.WithTitle("Log cleanup settings")
.AddField("Supported bots", botList);
var eb = new EmbedBuilder()
.Title("Log cleanup settings")
.Field(new("Supported bots", botList));
var guildCfg = await _db.Execute(c => _repo.GetGuild(c, ctx.GuildNew.Id));
if (guildCfg.LogCleanupEnabled)
eb.WithDescription("Log cleanup is currently **on** for this server. To disable it, type `pk;logclean off`.");
eb.Description("Log cleanup is currently **on** for this server. To disable it, type `pk;logclean off`.");
else
eb.WithDescription("Log cleanup is currently **off** for this server. To enable it, type `pk;logclean on`.");
eb.Description("Log cleanup is currently **off** for this server. To enable it, type `pk;logclean on`.");
await ctx.Reply(embed: eb.Build());
return;
}