mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
5471b412d9
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.
14 lines
358 B
C#
14 lines
358 B
C#
namespace West.TelegramBot.CodeWatcher;
|
|
|
|
public static class StringExtension
|
|
{
|
|
// https://stackoverflow.com/a/23408020
|
|
public static IEnumerable<string> SplitToLines(this string input)
|
|
{
|
|
using var reader = new StringReader(input);
|
|
while (reader.ReadLine() is { } line)
|
|
{
|
|
yield return line;
|
|
}
|
|
}
|
|
} |