-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
186 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
using System.Runtime.Serialization; | ||
|
||
namespace TamTam.Bot.Types.Enums { | ||
public enum ActionType { | ||
[EnumMember(Value = "typing_on")] | ||
TypingOn, | ||
|
||
[EnumMember(Value = "sending_photo")] | ||
SendingPhoto, | ||
|
||
[EnumMember(Value = "sending_video")] | ||
SendingVideo, | ||
|
||
[EnumMember(Value = "sending_audio")] | ||
SendingAudio, | ||
|
||
[EnumMember(Value = "sending_file")] | ||
SendingFile, | ||
|
||
[EnumMember(Value = "mark_seen")] | ||
MarkSeen | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
namespace TamTam.Bot.Types.Enums | ||
{ | ||
public enum AttachmentType { Image, Video, Audio, File, Contact, Sticker, Share, Location, InlineKeyboard } | ||
namespace TamTam.Bot.Types.Enums { | ||
public enum AttachmentType { | ||
Image, | ||
Video, | ||
Audio, | ||
File, | ||
Contact, | ||
Sticker, | ||
Share, | ||
Location, | ||
InlineKeyboard | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
using System.Runtime.Serialization; | ||
|
||
namespace TamTam.Bot.Types.Enums { | ||
public enum InlineButtonType { | ||
Callback, | ||
Link, | ||
|
||
[EnumMember(Value = "request_contact")] | ||
RequestContact, | ||
|
||
[EnumMember(Value = "request_geo_location")] | ||
RequestGeoLocation, | ||
|
||
Chat | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace TamTam.Bot.Types.Enums { | ||
public enum InputType { | ||
Callback, | ||
Message | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace TamTam.Bot.Types.Enums { | ||
[Flags] | ||
public enum Permissions { | ||
[EnumMember(Value = "read_all_messages")] | ||
ReadAllMessages, | ||
|
||
[EnumMember(Value = "add_remove_members")] | ||
AddRemoveMembers, | ||
|
||
[EnumMember(Value = "add_admins")] | ||
AddAdmins, | ||
|
||
[EnumMember(Value = "change_chat_info")] | ||
ChangeChatInfo, | ||
|
||
[EnumMember(Value = "pin_message")] | ||
PinMessage, | ||
|
||
Write | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using TamTam.Bot.Types.Enums; | ||
|
||
namespace TamTam.Bot.Types { | ||
public class Input { | ||
public InputType InputType; | ||
public Message[]? Messages; | ||
public Payload? Payload; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace TamTam.Bot.Types.Updates { | ||
public class MessageChatCreated { | ||
[JsonConverter(typeof(MillisecondEpochConverter))] | ||
public DateTime TimeStamp { get; set; } | ||
|
||
public Chat Chat { get; set; } | ||
public string MessageId { get; set; } | ||
public string? StartPayload { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace TamTam.Bot.Types.Updates { | ||
public class MessageConstructed { | ||
[JsonConverter(typeof(MillisecondEpochConverter))] | ||
public DateTime TimeStamp; | ||
|
||
public string SessionId; | ||
public Message Message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace TamTam.Bot.Types.Updates { | ||
public class MessageConstructionRequest { | ||
[JsonConverter(typeof(MillisecondEpochConverter))] | ||
public DateTime TimeStamp { get; set; } | ||
|
||
public User User { get; set; } | ||
public string? UserLocale { get; set; } | ||
public string SessionId { get; set; } | ||
public string? Data { get; set; } | ||
public Input Input { get; set; } | ||
} | ||
} |