fix: /banid and /ban id: performing duplicate bans (#4957)

This commit is contained in:
pajlada
2023-11-10 19:46:28 +01:00
committed by GitHub
parent 423829be43
commit 244efaa0a9
2 changed files with 1 additions and 12 deletions
@@ -163,17 +163,6 @@ QString sendBan(const CommandContext &ctx)
{
banUserByID(channel, twitchChannel, currentUser->getUserId(),
targetUserID, reason, targetUserID);
getHelix()->banUser(
twitchChannel->roomId(), currentUser->getUserId(), targetUserID,
std::nullopt, reason,
[] {
// No response for bans, they're emitted over pubsub/IRC instead
},
[channel, targetUserID{targetUserID}](auto error, auto message) {
auto errorMessage =
formatBanTimeoutError("ban", error, message, targetUserID);
channel->addMessage(makeSystemMessage(errorMessage));
});
}
else
{