Remove code in the stats handler that checks if 2021 has started
This commit is contained in:
parent
e495e2df17
commit
21303bfca8
1 changed files with 2 additions and 9 deletions
|
@ -17,15 +17,12 @@ namespace Geekbot.Bot.Handlers
|
||||||
private readonly IGeekbotLogger _logger;
|
private readonly IGeekbotLogger _logger;
|
||||||
private readonly DatabaseContext _database;
|
private readonly DatabaseContext _database;
|
||||||
private string _season;
|
private string _season;
|
||||||
// ToDo: Clean up in 2021
|
|
||||||
private bool _seasonsStarted;
|
|
||||||
|
|
||||||
public StatsHandler(IGeekbotLogger logger, DatabaseContext database)
|
public StatsHandler(IGeekbotLogger logger, DatabaseContext database)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_database = database;
|
_database = database;
|
||||||
_season = SeasonsUtils.GetCurrentSeason();
|
_season = SeasonsUtils.GetCurrentSeason();
|
||||||
_seasonsStarted = DateTime.Now.Year == 2021;
|
|
||||||
|
|
||||||
var timer = new Timer()
|
var timer = new Timer()
|
||||||
{
|
{
|
||||||
|
@ -38,7 +35,6 @@ namespace Geekbot.Bot.Handlers
|
||||||
var current = SeasonsUtils.GetCurrentSeason();
|
var current = SeasonsUtils.GetCurrentSeason();
|
||||||
if (current == _season) return;
|
if (current == _season) return;
|
||||||
_season = SeasonsUtils.GetCurrentSeason();
|
_season = SeasonsUtils.GetCurrentSeason();
|
||||||
_seasonsStarted = DateTime.Now.Year == 2021;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,11 +58,8 @@ namespace Geekbot.Bot.Handlers
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await UpdateTotalTable(message, channel);
|
await UpdateTotalTable(message, channel);
|
||||||
if (_seasonsStarted)
|
await UpdateSeasonsTable(message, channel);
|
||||||
{
|
|
||||||
await UpdateSeasonsTable(message, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (message.Author.IsBot) return;
|
if (message.Author.IsBot) return;
|
||||||
|
|
Loading…
Reference in a new issue