Add embed builder, some more ported classes

This commit is contained in:
Ske
2020-12-23 02:19:02 +01:00
parent 05334f0d25
commit f6fb8204bb
13 changed files with 305 additions and 189 deletions

View File

@@ -114,7 +114,7 @@ namespace PluralKit.Bot
try
{
var system = ctx.SystemId != null ? await _db.Execute(c => _repo.GetSystem(c, ctx.SystemId.Value)) : null;
await _tree.ExecuteCommand(new Context(_services, shard, guild, channel, evt, cmdStart, system, ctx, _bot.BotMemberIn(channel.GuildId!.Value)));
await _tree.ExecuteCommand(new Context(_services, shard, guild, channel, evt, cmdStart, system, ctx, _bot.PermissionsIn(channel.Id)));
}
catch (PKError)
{
@@ -147,8 +147,7 @@ namespace PluralKit.Bot
private async ValueTask<bool> TryHandleProxy(Shard shard, MessageCreateEvent evt, Guild guild, Channel channel, MessageContext ctx)
{
var botMember = _bot.BotMemberIn(channel.GuildId!.Value);
var botPermissions = PermissionExtensions.PermissionsFor(guild, channel, shard.User!.Id, botMember!.Roles);
var botPermissions = _bot.PermissionsIn(channel.Id);
try
{