- Removed static color fields

- Removed unused code
- BanTemplate will get error color from bot config
This commit is contained in:
Kwoth
2021-07-12 21:10:39 +02:00
parent 0e81f2abf4
commit 71da4d11c0
5 changed files with 6 additions and 48 deletions

View File

@@ -25,14 +25,16 @@ namespace NadekoBot.Modules.Administration.Services
private readonly MuteService _mute;
private readonly DbService _db;
private readonly BlacklistService _blacklistService;
private readonly BotConfigService _bcs;
private readonly Timer _warnExpiryTimer;
public UserPunishService(MuteService mute, DbService db, BlacklistService blacklistService)
public UserPunishService(MuteService mute, DbService db, BlacklistService blacklistService, BotConfigService bcs)
{
_mute = mute;
_db = db;
_blacklistService = blacklistService;
_bcs = bcs;
_warnExpiryTimer = new Timer(async _ =>
{
await CheckAllWarnExpiresAsync();
@@ -455,7 +457,7 @@ WHERE GuildId={guildId}
{
template = JsonConvert.SerializeObject(new
{
color = Bot.ErrorColor.RawValue,
color = _bcs.Data.Color.Error,
description = defaultMessage
});
}
@@ -470,7 +472,7 @@ WHERE GuildId={guildId}
{
template = JsonConvert.SerializeObject(new
{
color = Bot.ErrorColor.RawValue,
color = _bcs.Data.Color.Error,
description = template
});
}