mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 20:42:04 -04:00
Added a generic interface for retrieving images. Where multiple images exist, it'll retrieve the least seen. If there are sufficient images to work with, it'll randomly pick from a subset of the least seen to make it less predictable what's going to show up.
This commit is contained in:
@@ -37,186 +37,6 @@ public class SetRoleCommand : ICommand
|
||||
}
|
||||
}
|
||||
|
||||
public class GmKasinoAddCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin gmkasino add (?<image>.+)$")
|
||||
];
|
||||
|
||||
public string? HelpText => "Add an image to the gmkasino image list";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var images = (await Helpers.GetValue(BuiltIn.Keys.BotGmKasinoImageRotation)).JsonDeserialize<List<string>>();
|
||||
if (images == null)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Images list was null", true);
|
||||
return;
|
||||
}
|
||||
var newImage = arguments["image"].Value;
|
||||
if (images.Contains(newImage))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Image is already in the list", true);
|
||||
return;
|
||||
}
|
||||
|
||||
images.Add(newImage);
|
||||
await Helpers.SetValueAsJsonObject(BuiltIn.Keys.BotGmKasinoImageRotation, images);
|
||||
await botInstance.SendChatMessageAsync("Updated list of images", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class GmKasinoRemoveCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin gmkasino remove (?<image>.+)$")
|
||||
];
|
||||
|
||||
public string? HelpText => "Remove an image in the gmkasino image list";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var images = (await Helpers.GetValue(BuiltIn.Keys.BotGmKasinoImageRotation)).JsonDeserialize<List<string>>();
|
||||
if (images == null)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Images list was null", true);
|
||||
return;
|
||||
}
|
||||
var targetImage = arguments["image"].Value;
|
||||
if (!images.Contains(targetImage))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Image is not in the list", true);
|
||||
return;
|
||||
}
|
||||
|
||||
images.Remove(targetImage);
|
||||
await Helpers.SetValueAsJsonObject(BuiltIn.Keys.BotGmKasinoImageRotation, images);
|
||||
await botInstance.SendChatMessageAsync("Updated list of images", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class GmKasinoListCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin gmkasino list$")
|
||||
];
|
||||
|
||||
public string? HelpText => "Dump out the list of images for gmkasino";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var images = (await Helpers.GetValue(BuiltIn.Keys.BotGmKasinoImageRotation)).JsonDeserialize<List<string>>();
|
||||
if (images == null)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Images list was null", true);
|
||||
return;
|
||||
}
|
||||
|
||||
var result = "List of images:";
|
||||
var i = 0;
|
||||
foreach (var image in images)
|
||||
{
|
||||
i++;
|
||||
result += $"[br]{i}: {image}";
|
||||
}
|
||||
|
||||
await botInstance.SendChatMessagesAsync(result.FancySplitMessage(partSeparator: "[br]"), true);
|
||||
}
|
||||
}
|
||||
|
||||
public class GnKasinoAddCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin gnkasino add (?<image>.+)$")
|
||||
];
|
||||
|
||||
public string? HelpText => "Add an image to the gnkasino image list";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var images = (await Helpers.GetValue(BuiltIn.Keys.BotGnKasinoImageRotation)).JsonDeserialize<List<string>>();
|
||||
if (images == null)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Images list was null", true);
|
||||
return;
|
||||
}
|
||||
var newImage = arguments["image"].Value;
|
||||
if (images.Contains(newImage))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Image is already in the list", true);
|
||||
return;
|
||||
}
|
||||
|
||||
images.Add(newImage);
|
||||
await Helpers.SetValueAsJsonObject(BuiltIn.Keys.BotGnKasinoImageRotation, images);
|
||||
await botInstance.SendChatMessageAsync("Updated list of images", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class GnKasinoRemoveCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin gnkasino remove (?<image>.+)$")
|
||||
];
|
||||
|
||||
public string? HelpText => "Remove an image in the gnkasino image list";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var images = (await Helpers.GetValue(BuiltIn.Keys.BotGnKasinoImageRotation)).JsonDeserialize<List<string>>();
|
||||
if (images == null)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Images list was null", true);
|
||||
return;
|
||||
}
|
||||
var targetImage = arguments["image"].Value;
|
||||
if (!images.Contains(targetImage))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Image is not in the list", true);
|
||||
return;
|
||||
}
|
||||
|
||||
images.Remove(targetImage);
|
||||
await Helpers.SetValueAsJsonObject(BuiltIn.Keys.BotGnKasinoImageRotation, images);
|
||||
await botInstance.SendChatMessageAsync("Updated list of images", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class GnKasinoListCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin gnkasino list$")
|
||||
];
|
||||
|
||||
public string? HelpText => "Dump out the list of images for gnkasino";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var images = (await Helpers.GetValue(BuiltIn.Keys.BotGnKasinoImageRotation)).JsonDeserialize<List<string>>();
|
||||
if (images == null)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("Images list was null", true);
|
||||
return;
|
||||
}
|
||||
|
||||
var result = "List of images:";
|
||||
var i = 0;
|
||||
foreach (var image in images)
|
||||
{
|
||||
i++;
|
||||
result += $"[br]{i}: {image}";
|
||||
}
|
||||
|
||||
await botInstance.SendChatMessagesAsync(result.FancySplitMessage(partSeparator: "[br]"), true);
|
||||
}
|
||||
}
|
||||
|
||||
public class ToggleLiveStatusAdminCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
|
||||
159
KfChatDotNetBot/Commands/ImageCommands.cs
Normal file
159
KfChatDotNetBot/Commands/ImageCommands.cs
Normal file
@@ -0,0 +1,159 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using KfChatDotNetBot.Models.DbModels;
|
||||
using KfChatDotNetBot.Services;
|
||||
using KfChatDotNetBot.Settings;
|
||||
using KfChatDotNetWsClient.Models.Events;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace KfChatDotNetBot.Commands;
|
||||
|
||||
public class AddImageCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin image (?<key>\w+) add (?<url>.+)$"),
|
||||
new Regex(@"^admin images (?<key>\w+) add (?<url>.+)$")
|
||||
];
|
||||
public string? HelpText => "Add an image to the image rotation specified";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments,
|
||||
CancellationToken ctx)
|
||||
{
|
||||
await using var db = new ApplicationDbContext();
|
||||
var imageKeys = (await Helpers.GetValue(BuiltIn.Keys.BotImageAcceptableKeys)).JsonDeserialize<List<string>>();
|
||||
if (imageKeys == null) throw new InvalidOperationException($"{BuiltIn.Keys.BotImageAcceptableKeys} was null");
|
||||
var key = arguments["key"].Value;
|
||||
var url = arguments["url"].Value;
|
||||
if (!imageKeys.Contains(key))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync(
|
||||
$"Key you specified is not supported. Available keys are: {string.Join(' ', imageKeys)}", true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (await db.Images.AnyAsync(i => i.Key == key && i.Url == url, ctx))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("This image already exists in the database with this key", true);
|
||||
return;
|
||||
}
|
||||
|
||||
await db.Images.AddAsync(new ImageDbModel { Key = key, Url = url, LastSeen = DateTimeOffset.MinValue }, ctx);
|
||||
await db.SaveChangesAsync(ctx);
|
||||
await botInstance.SendChatMessageAsync("Added image to database", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class RemoveImageCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin image (?<key>\w+) remove (?<url>.+)$"),
|
||||
new Regex(@"^admin images (?<key>\w+) remove (?<url>.+)$"),
|
||||
new Regex(@"^admin image (?<key>\w+) delete (?<url>.+)$"),
|
||||
new Regex(@"^admin images (?<key>\w+) delete (?<url>.+)$")
|
||||
];
|
||||
public string? HelpText => "Remove an image from the image rotation specified";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments,
|
||||
CancellationToken ctx)
|
||||
{
|
||||
await using var db = new ApplicationDbContext();
|
||||
var imageKeys = (await Helpers.GetValue(BuiltIn.Keys.BotImageAcceptableKeys)).JsonDeserialize<List<string>>();
|
||||
if (imageKeys == null) throw new InvalidOperationException($"{BuiltIn.Keys.BotImageAcceptableKeys} was null");
|
||||
var key = arguments["key"].Value;
|
||||
var url = arguments["url"].Value;
|
||||
if (!imageKeys.Contains(key))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync(
|
||||
$"Key you specified is not supported. Available keys are: {string.Join(' ', imageKeys)}", true);
|
||||
return;
|
||||
}
|
||||
|
||||
var image = await db.Images.FirstOrDefaultAsync(i => i.Key == key && i.Url == url, ctx);
|
||||
if (image == null)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync("This image isn't in the database with this key", true);
|
||||
return;
|
||||
}
|
||||
|
||||
db.Images.Remove(image);
|
||||
await db.SaveChangesAsync(ctx);
|
||||
await botInstance.SendChatMessageAsync("Removed image from database", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class ListImageCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^admin image (?<key>\w+) list$"),
|
||||
new Regex(@"^admin images (?<key>\w+) list$")
|
||||
];
|
||||
public string? HelpText => "Remove an image from the image rotation specified";
|
||||
public UserRight RequiredRight => UserRight.TrueAndHonest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments,
|
||||
CancellationToken ctx)
|
||||
{
|
||||
await using var db = new ApplicationDbContext();
|
||||
var imageKeys = (await Helpers.GetValue(BuiltIn.Keys.BotImageAcceptableKeys)).JsonDeserialize<List<string>>();
|
||||
if (imageKeys == null) throw new InvalidOperationException($"{BuiltIn.Keys.BotImageAcceptableKeys} was null");
|
||||
var key = arguments["key"].Value;
|
||||
if (!imageKeys.Contains(key))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync(
|
||||
$"Key you specified is not supported. Available keys are: {string.Join(' ', imageKeys)}", true);
|
||||
return;
|
||||
}
|
||||
|
||||
var images = db.Images.Where(i => i.Key == key);
|
||||
var i = 0;
|
||||
var result = $"List of images for {key}:";
|
||||
foreach (var image in images)
|
||||
{
|
||||
i++;
|
||||
result += $"[br]{i}: {image.Url}";
|
||||
}
|
||||
|
||||
await botInstance.SendChatMessagesAsync(result.FancySplitMessage(partSeparator: "[br]"),
|
||||
bypassSeshDetect: true);
|
||||
}
|
||||
}
|
||||
|
||||
[AllowAdditionalMatches]
|
||||
public class GetRandomImage : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex(@"^(?<key>\w+)")
|
||||
];
|
||||
public string? HelpText => "Get a random image";
|
||||
public UserRight RequiredRight => UserRight.Loser;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments,
|
||||
CancellationToken ctx)
|
||||
{
|
||||
await using var db = new ApplicationDbContext();
|
||||
var key = arguments["key"].Value.ToLower();
|
||||
var images = db.Images.Where(i => i.Key == key);
|
||||
if (!await images.AnyAsync(ctx)) return;
|
||||
var divideBy = (await Helpers.GetValue(BuiltIn.Keys.BotImageRandomSliceDivideBy)).ToType<int>();
|
||||
var limit = 1;
|
||||
var count = await images.CountAsync(ctx);
|
||||
if (count > divideBy)
|
||||
{
|
||||
limit = count / divideBy;
|
||||
}
|
||||
|
||||
// EF with SQLite can't sort on dates as it's just TEXT
|
||||
var selection = (await images.ToListAsync(ctx)).OrderBy(i => i.LastSeen).Take(limit).ToList();
|
||||
// MaxValue is never returned by Next so you don't need to -1 for indexing
|
||||
var image = selection[new Random().Next(0, selection.Count)];
|
||||
image.LastSeen = DateTimeOffset.UtcNow;
|
||||
db.Images.Update(image);
|
||||
await db.SaveChangesAsync(ctx);
|
||||
await botInstance.SendChatMessageAsync($"[img]{image.Url}[/img]", true);
|
||||
}
|
||||
}
|
||||
@@ -36,64 +36,6 @@ public class TwistedCommand : ICommand
|
||||
}
|
||||
}
|
||||
|
||||
public class HelpMeCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [new Regex("^helpme")];
|
||||
public string? HelpText => "Somebody please help me";
|
||||
public UserRight RequiredRight => UserRight.Guest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
// ReSharper disable once StringLiteralTypo
|
||||
await botInstance.SendChatMessageAsync("[img]https://i.postimg.cc/fTw6tGWZ/ineedmoneydumbfuck.png[/img]", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class SentCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [new Regex("^sent$")];
|
||||
public string? HelpText => "Sent love";
|
||||
public UserRight RequiredRight => UserRight.Guest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
// ReSharper disable once StringLiteralTypo
|
||||
await botInstance.SendChatMessageAsync("[img]https://i.ibb.co/GHq7hb1/4373-g-N5-HEH2-Hkc.png[/img]", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class GmKasinoCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [new Regex("^gmkasino")];
|
||||
public string? HelpText => "Good Morning Kasino";
|
||||
public UserRight RequiredRight => UserRight.Guest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var images = (await Helpers.GetValue(BuiltIn.Keys.BotGmKasinoImageRotation)).JsonDeserialize<List<string>>();
|
||||
if (images == null) return;
|
||||
var random = new Random();
|
||||
var image = images[random.Next(images.Count)];
|
||||
await botInstance.SendChatMessageAsync($"[img]{image}[/img]", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class GnKasinoCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [new Regex("^gnkasino")];
|
||||
public string? HelpText => "Good Night, Kasino";
|
||||
public UserRight RequiredRight => UserRight.Loser;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var images = (await Helpers.GetValue(BuiltIn.Keys.BotGnKasinoImageRotation)).JsonDeserialize<List<string>>();
|
||||
if (images == null) return;
|
||||
var random = new Random();
|
||||
var image = images[random.Next(images.Count)];
|
||||
await botInstance.SendChatMessageAsync($"[img]{image}[/img]", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class CrackedCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
@@ -117,51 +59,6 @@ public class CrackedCommand : ICommand
|
||||
}
|
||||
}
|
||||
|
||||
public class WinmanjackCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex("^winmanjack")
|
||||
];
|
||||
public string? HelpText => "winmanjack.jpg";
|
||||
public UserRight RequiredRight => UserRight.Loser;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var image = await Helpers.GetValue(BuiltIn.Keys.WinmanjackImgUrl);
|
||||
await botInstance.SendChatMessageAsync($"[img]{image.Value}[/img]", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class PraygeCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex("^prayge")
|
||||
];
|
||||
public string? HelpText => "prayge.jpg";
|
||||
public UserRight RequiredRight => UserRight.Loser;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var image = await Helpers.GetValue(BuiltIn.Keys.BotPraygeImgUrl);
|
||||
await botInstance.SendChatMessageAsync($"[img]{image.Value}[/img]", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class CrackpipeCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex("^crackpipe")
|
||||
];
|
||||
public string? HelpText => "crackpipe.gif";
|
||||
public UserRight RequiredRight => UserRight.Loser;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
var image = await Helpers.GetValue(BuiltIn.Keys.BotCrackpipeImgUrl);
|
||||
await botInstance.SendChatMessageAsync($"[img]{image.Value}[/img]", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class CleanCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
@@ -183,7 +80,7 @@ public class CleanCommand : ICommand
|
||||
}
|
||||
}
|
||||
|
||||
public class RehbCommand : ICommand
|
||||
public class RehabCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [
|
||||
new Regex("^rehab")
|
||||
@@ -320,19 +217,6 @@ public class JailCommand : ICommand
|
||||
}
|
||||
}
|
||||
|
||||
public class BassmanJackCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [new Regex("^bassmanjack")];
|
||||
public string? HelpText => "Bassman image";
|
||||
public UserRight RequiredRight => UserRight.Guest;
|
||||
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
|
||||
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx)
|
||||
{
|
||||
// ReSharper disable once StringLiteralTypo
|
||||
await botInstance.SendChatMessageAsync("[img]https://i.postimg.cc/SRstzMQt/boss-soy-koi.gif[/img]", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class LastStreamCommand : ICommand
|
||||
{
|
||||
public List<Regex> Patterns => [new Regex("^laststream")];
|
||||
|
||||
Reference in New Issue
Block a user