mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 12:32:03 -04:00
All the ancillary services have been moved out of the chatbot's class and relocated to a separate file. THe code is still very messy but at least it'll make the main bot easier to navigate.
Also refactored a bunch of shit * Removed the thread used for pinging, now an async timer * Kick will no longer block the bot from starting * Twitch initialization follows the same rules as other services where everything is contained to its build method * Fixed a bug where the bot's heartbeat logic would get messed up by the machine timezone if it wasn't UTC
This commit is contained in:
@@ -15,7 +15,7 @@ public class TempEnableDiscordRelayingCommand : ICommand
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
botInstance.TemporarilyBypassGambaSeshForDiscord = true;
|
||||
botInstance.BotServices.TemporarilyBypassGambaSeshForDiscord = true;
|
||||
botInstance.SendChatMessage("Enjoy Discord messages, stalker child", true);
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class TempSuppressGambaMessages : ICommand
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
botInstance.TemporarilySuppressGambaMessages = true;
|
||||
botInstance.BotServices.TemporarilySuppressGambaMessages = true;
|
||||
botInstance.SendChatMessage("No more gamba notifs", true);
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public class EnableGambaMessages : ICommand
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
botInstance.TemporarilySuppressGambaMessages = false;
|
||||
botInstance.BotServices.TemporarilySuppressGambaMessages = false;
|
||||
botInstance.SendChatMessage("Gamba notifs back on the menu", true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user