| | | 1 | | namespace TeleFlow.Telegram; |
| | | 2 | | |
| | | 3 | | public readonly record struct ChatAction |
| | | 4 | | { |
| | | 5 | | private ChatAction(string value) |
| | | 6 | | { |
| | 14 | 7 | | ArgumentException.ThrowIfNullOrWhiteSpace(value); |
| | 13 | 8 | | Value = value.Trim(); |
| | 13 | 9 | | } |
| | | 10 | | |
| | | 11 | | public string Value { get; } |
| | | 12 | | |
| | 1 | 13 | | public static ChatAction Typing { get; } = new("typing"); |
| | | 14 | | |
| | 1 | 15 | | public static ChatAction UploadPhoto { get; } = new("upload_photo"); |
| | | 16 | | |
| | 1 | 17 | | public static ChatAction RecordVideo { get; } = new("record_video"); |
| | | 18 | | |
| | 1 | 19 | | public static ChatAction UploadVideo { get; } = new("upload_video"); |
| | | 20 | | |
| | 1 | 21 | | public static ChatAction RecordVoice { get; } = new("record_voice"); |
| | | 22 | | |
| | 1 | 23 | | public static ChatAction UploadVoice { get; } = new("upload_voice"); |
| | | 24 | | |
| | 1 | 25 | | public static ChatAction UploadDocument { get; } = new("upload_document"); |
| | | 26 | | |
| | 1 | 27 | | public static ChatAction ChooseSticker { get; } = new("choose_sticker"); |
| | | 28 | | |
| | 1 | 29 | | public static ChatAction FindLocation { get; } = new("find_location"); |
| | | 30 | | |
| | 1 | 31 | | public static ChatAction RecordVideoNote { get; } = new("record_video_note"); |
| | | 32 | | |
| | 1 | 33 | | public static ChatAction UploadVideoNote { get; } = new("upload_video_note"); |
| | | 34 | | |
| | | 35 | | public static ChatAction Custom(string value) |
| | | 36 | | { |
| | 3 | 37 | | return new ChatAction(value); |
| | | 38 | | } |
| | | 39 | | |
| | | 40 | | public override string ToString() |
| | | 41 | | { |
| | 0 | 42 | | return Value; |
| | | 43 | | } |
| | | 44 | | } |