From 130d56b5f6b27fd2ae77a0d78279f0170c84df15 Mon Sep 17 00:00:00 2001 From: Lan <50151341+Lannnnnnnnn@users.noreply.github.com> Date: Mon, 18 Jul 2022 16:03:53 +0300 Subject: [PATCH] small fix the shitty jojo reference and the umm command permission thing umm --- Kehyeedra3/Command handler.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Kehyeedra3/Command handler.cs b/Kehyeedra3/Command handler.cs index efcf9a5..67d0b6a 100644 --- a/Kehyeedra3/Command handler.cs +++ b/Kehyeedra3/Command handler.cs @@ -61,7 +61,7 @@ namespace Kehyeedra3 if (message.Content.ToLowerInvariant().Contains("jojo")) { - var jojoke = WeebClient.DownloadString("https://api.skuldbot.uk/fun/jojoke/?raw"); + var jojoke = WeebClient.DownloadString("https://api.exsersewo.dev/jojoke/?raw"); await Context.Channel.SendMessageAsync($"{Context.User.Mention} is that a fucksnifflerling {jojoke} reference?"); } @@ -73,19 +73,9 @@ namespace Kehyeedra3 if (perms.Value.SendMessages == PermValue.Deny) return; } var botGuild = _bot.GetGuild(chan.GuildId).GetUser(_bot.CurrentUser.Id); - bool exit = false; - botGuild.Roles.OrderByDescending(x => x.Position).ToList().ForEach(x => - { - perms = chan.GetPermissionOverwrite(x); - - if (perms.HasValue) - { - if (perms.Value.SendMessages == PermValue.Deny) { exit = true; return; } - } - }); + if (!botGuild.GetPermissions(chan).SendMessages) return; - if (exit) return; } if (!(message.HasStringPrefix(Configuration.Load().Prefix, ref argPos))) return;