From 88bb1b4ae742f66e4f7505cfdec9edf157118744 Mon Sep 17 00:00:00 2001 From: 2547techno <109011672+2547techno@users.noreply.github.com> Date: Sat, 15 Apr 2023 13:59:46 -0400 Subject: [PATCH] Add message for empty mod list. (#4546) --- CHANGELOG.md | 1 + src/controllers/commands/CommandController.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 094d3f113..dbd8eb8e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Minor: Added better filter validation and error messages. (#4364) - Minor: Updated the look of the Black Theme to be more in line with the other themes. (#4523) - Minor: Reply context now censors blocked users. (#4502) +- Minor: Added system message for empty mod list. (#4546) - Minor: Added `/lowtrust` command to open the suspicious user activity feed in browser. (#4542) - Bugfix: Fixed an issue where animated emotes would render on top of zero-width emotes. (#4314) - Bugfix: Fixed an issue where it was difficult to hover a zero-width emote. (#4314) diff --git a/src/controllers/commands/CommandController.cpp b/src/controllers/commands/CommandController.cpp index 01abcc26f..5fe738fa5 100644 --- a/src/controllers/commands/CommandController.cpp +++ b/src/controllers/commands/CommandController.cpp @@ -1161,6 +1161,13 @@ void CommandController::initialize(Settings &, Paths &paths) getHelix()->getModerators( twitchChannel->roomId(), 500, [channel, twitchChannel](auto result) { + if (result.empty()) + { + channel->addMessage(makeSystemMessage( + "This channel does not have any moderators.")); + return; + } + // TODO: sort results? MessageBuilder builder;