mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-22 05:54:36 +00:00
Noi
2f0fe8641a
The BirthdayBot class has been split up into ShardInstance and ShardManager. Several other things have been reorganized so that shards may act independently. The overall goal of these changes made is to limit failures to sections that can easily be discarded and replaced.
16 lines
448 B
C#
16 lines
448 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BirthdayBot.BackgroundServices
|
|
{
|
|
abstract class BackgroundService
|
|
{
|
|
protected ShardInstance ShardInstance { get; }
|
|
|
|
public BackgroundService(ShardInstance instance) => ShardInstance = instance;
|
|
|
|
protected void Log(string message) => ShardInstance.Log(GetType().Name, message);
|
|
|
|
public abstract Task OnTick(CancellationToken token);
|
|
}
|
|
}
|