yagpdb
yagpdb copied to clipboard
moderation: check bot hierarchy before performing kick/ban
Similar to https://github.com/jonas747/yagpdb/pull/887, but for kick and ban (totally forgot about this, otherwise I would've included it in the original PR 😄). This is a slightly more annoying/confusing issue for users - kick and ban would still send a moderation DM if the bot did not have sufficient permissions to moderate the user. Works fine on selfhost, as far as I can see.
this has conflicts now
Should be fixed now @jonas747
Not needed after https://github.com/jonas747/yagpdb/commit/1772fe30bcd4a3849781e3ee92cb54b75f78e433
Actually, not sure if https://github.com/jonas747/yagpdb/commit/1772fe30bcd4a3849781e3ee92cb54b75f78e433 fully resolves this -- as far as I can see the issue will still occur if the target member is higher than the bot. WDYT @jonas747? Happy to modify this PR to just add that fix / keep it closed if you don't think it's worth the additional complexity 😄
I'll reopen, but we only need that one check then
Should be good now, just tested.