the shitty jojo reference and the umm command permission thing umm
master
Lan 2 years ago
parent de1fe38a31
commit 130d56b5f6
  1. 14
      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;

Loading…
Cancel
Save