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:
@@ -5,13 +5,10 @@ public static class StringExtension
|
||||
// https://stackoverflow.com/a/23408020
|
||||
public static IEnumerable<string> SplitToLines(this string input)
|
||||
{
|
||||
using (var reader = new StringReader(input))
|
||||
using var reader = new StringReader(input);
|
||||
while (reader.ReadLine() is { } line)
|
||||
{
|
||||
string line;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
yield return line;
|
||||
}
|
||||
yield return line;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user