/userinfo: Show if the user was kicked (#242)
Closes #241 Updates: - Show if the user was kicked by [adding "Kicked" parameter to MemberData](https://github.com/LabsDevelopment/Octobot/issues/241) - Change `mctaylors-ru`'s `UserInfoBannedPermanently` string to be different from `UserInfoBanned` - Finally add `AppendPunishmentsInformation` method to avoid Cognitive Complexity - Use MemberData to check if the user was banned - Rename variable `isMuted` to `wasMuted` to be consistent with other variable names --------- Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
7d9a85d815
commit
285763d50d
9 changed files with 58 additions and 24 deletions
|
@ -300,9 +300,9 @@ public class MuteCommandGroup : CommandGroup
|
|||
}
|
||||
|
||||
var memberData = data.GetOrCreateMemberData(target.ID);
|
||||
var isMuted = memberData.MutedUntil is not null || communicationDisabledUntil is not null;
|
||||
var wasMuted = memberData.MutedUntil is not null || communicationDisabledUntil is not null;
|
||||
|
||||
if (!isMuted)
|
||||
if (!wasMuted)
|
||||
{
|
||||
var failedEmbed = new EmbedBuilder().WithSmallTitle(Messages.UserNotMuted, bot)
|
||||
.WithColour(ColorsList.Red).Build();
|
||||
|
|
Reference in a new issue