Added separate restream shill message for commercial breaks

This commit is contained in:
barelyprofessional
2025-02-17 21:10:41 +08:00
parent 8d42f3b1e3
commit dbc4ef2ba1
3 changed files with 30 additions and 2 deletions

View File

@@ -40,7 +40,24 @@ public class SetRestreamCommand : ICommand
await Helpers.SetValue(BuiltIn.Keys.RestreamUrl, arguments["url"].Value);
await botInstance.SendChatMessageAsync($"@{message.Author.Username}, updated URL", true);
}
}
public class SetShillRestreamCommand : ICommand
{
public List<Regex> Patterns => [
new Regex("^restream setshill (?<url>.+)$")
];
public string? HelpText => "Set restream shill URL";
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 Helpers.SetValue(BuiltIn.Keys.TwitchCommercialRestreamShillMessage, arguments["url"].Value);
await botInstance.SendChatMessageAsync($"@{message.Author.Username}, updated URL for the commercial break restream shill", true);
}
}
public class SelfPromoCommand : ICommand