mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Relocated the Discord command and made it a toggle
This commit is contained in:
@@ -537,3 +537,21 @@ public class ToggleForcedGambaMessagesCommand : ICommand
|
|||||||
await botInstance.SendChatMessageAsync($"TemporarilyForceGambaMessages is now {botInstance.BotServices.TemporarilyForceGambaMessages}", true);
|
await botInstance.SendChatMessageAsync($"TemporarilyForceGambaMessages is now {botInstance.BotServices.TemporarilyForceGambaMessages}", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ToggleDiscordRelayingCommand : ICommand
|
||||||
|
{
|
||||||
|
public List<Regex> Patterns => [
|
||||||
|
new Regex("^tempenable discord$", RegexOptions.IgnoreCase),
|
||||||
|
new Regex("^admin toggle discord", RegexOptions.IgnoreCase)
|
||||||
|
];
|
||||||
|
|
||||||
|
public string? HelpText => null;
|
||||||
|
public UserRight RequiredRight => UserRight.Guest;
|
||||||
|
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||||
|
public RateLimitOptionsModel? RateLimitOptions => null;
|
||||||
|
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||||
|
{
|
||||||
|
botInstance.BotServices.TemporarilyBypassGambaSeshForDiscord = !botInstance.BotServices.TemporarilyBypassGambaSeshForDiscord;
|
||||||
|
await botInstance.SendChatMessageAsync($"TemporarilyBypassGambaSeshForDiscord is now {botInstance.BotServices.TemporarilyBypassGambaSeshForDiscord}", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,23 +6,6 @@ using KfChatDotNetWsClient.Models.Events;
|
|||||||
|
|
||||||
namespace KfChatDotNetBot.Commands;
|
namespace KfChatDotNetBot.Commands;
|
||||||
|
|
||||||
public class TempEnableDiscordRelayingCommand : ICommand
|
|
||||||
{
|
|
||||||
public List<Regex> Patterns => [
|
|
||||||
new Regex("^tempenable discord$")
|
|
||||||
];
|
|
||||||
|
|
||||||
public string? HelpText => null;
|
|
||||||
public UserRight RequiredRight => UserRight.Guest;
|
|
||||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
|
||||||
public RateLimitOptionsModel? RateLimitOptions => null;
|
|
||||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
|
||||||
{
|
|
||||||
botInstance.BotServices.TemporarilyBypassGambaSeshForDiscord = true;
|
|
||||||
await botInstance.SendChatMessageAsync("Enjoy Discord messages, stalker child", true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TempSuppressGambaMessages : ICommand
|
public class TempSuppressGambaMessages : ICommand
|
||||||
{
|
{
|
||||||
public List<Regex> Patterns => [
|
public List<Regex> Patterns => [
|
||||||
|
|||||||
Reference in New Issue
Block a user