1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-19 04:04:18 +03:00

Reply emojis are now taken from a single file

This commit is contained in:
mctaylors 2022-12-06 18:20:41 +03:00
parent cec041f096
commit 15c42a6ef5
9 changed files with 42 additions and 42 deletions

View file

@ -20,7 +20,7 @@ public sealed class MuteCommand : ICommand {
|| (toMute.TimedOutUntil is not null
&& toMute.TimedOutUntil.Value.ToUnixTimeSeconds()
> DateTimeOffset.Now.ToUnixTimeSeconds())) {
cmd.Reply(Messages.MemberAlreadyMuted, Prefixes.Error);
cmd.Reply(Messages.MemberAlreadyMuted, ReplyEmojis.Error);
return;
}
@ -30,7 +30,7 @@ public sealed class MuteCommand : ICommand {
foreach (var roleId in mutedRemovedRoles) await toMute.AddRoleAsync(roleId);
rolesRemoved.Remove(toMute.Id);
cmd.ConfigWriteScheduled = true;
cmd.Reply(Messages.RolesReturned, Prefixes.Warning);
cmd.Reply(Messages.RolesReturned, ReplyEmojis.Warning);
}
if (cmd.HasPermission(GuildPermission.ModerateMembers) && cmd.CanInteractWith(toMute, "Mute"))
@ -55,7 +55,7 @@ public sealed class MuteCommand : ICommand {
rolesRemoved.Add(userRole.Id);
} catch (HttpException e) {
cmd.Reply(string.Format(Messages.RoleRemovalFailed, $"<@&{userRole}>", Utils.Wrap(e.Reason)),
Prefixes.Warning);
ReplyEmojis.Warning);
}
Boyfriend.GetRemovedRoles(guild.Id).Add(toMute.Id, rolesRemoved.AsReadOnly());
@ -68,12 +68,12 @@ public sealed class MuteCommand : ICommand {
await Task.FromResult(Utils.DelayedUnmuteAsync(cmd, toMute, Messages.PunishmentExpired, duration));
} else {
if (!hasDuration || duration.TotalDays > 28) {
cmd.Reply(Messages.DurationRequiredForTimeOuts, Prefixes.Error);
cmd.Reply(Messages.DurationRequiredForTimeOuts, ReplyEmojis.Error);
return;
}
if (toMute.IsBot) {
cmd.Reply(Messages.CannotTimeOutBot, Prefixes.Error);
cmd.Reply(Messages.CannotTimeOutBot, ReplyEmojis.Error);
return;
}
@ -83,7 +83,7 @@ public sealed class MuteCommand : ICommand {
var feedback = string.Format(Messages.FeedbackMemberMuted, toMute.Mention,
Utils.GetHumanizedTimeOffset(duration),
Utils.Wrap(reason));
cmd.Reply(feedback, Prefixes.Muted);
cmd.Reply(feedback, ReplyEmojis.Muted);
cmd.Audit(feedback);
}
}