mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[code-watcher] Add CodeWatcherMode option.
There are three option values:
- Disabled: module does nothing (wow).
- Remove: module removes matching messages and sends temporary message
to instruct user what to do.
- Upload: module uploads detected code to configured Haste Server.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Kruzya.TelegramBot.Core.Options;
|
||||
|
||||
namespace West.TelegramBot.CodeWatcher.Options;
|
||||
|
||||
public class CodeWatcherMode : AbstractOption<CodeWatcherMode, string>
|
||||
{
|
||||
public override string OptionId => "codeWatcherMode";
|
||||
public override string OptionName => "CodeWatcher™ mode";
|
||||
public override OptionType OptionType => OptionType.Select;
|
||||
public override string DefaultValue => "remove";
|
||||
|
||||
public CodeWatcherMode(IOptionProvider optionProvider) : base(optionProvider)
|
||||
{
|
||||
ChoiceList.AddRange(new []
|
||||
{
|
||||
new SelectChoice("disabled", "Disabled", "D"),
|
||||
new SelectChoice("remove", "Remove", "R"),
|
||||
new SelectChoice("upload", "Upload", "U")
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user