summaryrefslogtreecommitdiff
path: root/src/types
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2024-07-27 05:56:48 +0300
committerGravatar Uko Kokņevičs2024-07-27 05:58:51 +0300
commit98abaf3d19631f1280b83467d38f28b150a02a3a (patch)
treefdf3094c3c18421d9ee23c244a668f2e274a9b57 /src/types
parentSend a different GIF when bot gets added (diff)
downloadukkobot-98abaf3d19631f1280b83467d38f28b150a02a3a.tar.gz
ukkobot-98abaf3d19631f1280b83467d38f28b150a02a3a.tar.xz
ukkobot-98abaf3d19631f1280b83467d38f28b150a02a3a.zip
Add a default values to (hopefully) all nullable fields
Diffstat (limited to 'src/types')
-rw-r--r--src/types/ChatInviteLink.zig8
-rw-r--r--src/types/ChatJoinRequest.zig4
-rw-r--r--src/types/ChosenInlineResult.zig2
-rw-r--r--src/types/Document.zig4
-rw-r--r--src/types/EncryptedPassportElement.zig16
-rw-r--r--src/types/InlineQuery.zig4
-rw-r--r--src/types/PollAnswer.zig4
-rw-r--r--src/types/PreCheckoutQuery.zig4
-rw-r--r--src/types/SwitchInlineQueryChosenChat.zig2
-rw-r--r--src/types/message_origin.zig4
10 files changed, 26 insertions, 26 deletions
diff --git a/src/types/ChatInviteLink.zig b/src/types/ChatInviteLink.zig
index 41a1f44..232ddcc 100644
--- a/src/types/ChatInviteLink.zig
+++ b/src/types/ChatInviteLink.zig
@@ -5,7 +5,7 @@ creator: User,
5creates_join_request: bool, 5creates_join_request: bool,
6is_primary: bool, 6is_primary: bool,
7is_revoked: bool, 7is_revoked: bool,
8name: ?[]const u8, 8name: ?[]const u8 = null,
9expire_date: ?u64, 9expire_date: ?u64 = null,
10member_limit: ?u64, 10member_limit: ?u64 = null,
11pending_join_request_count: ?u64, 11pending_join_request_count: ?u64 = null,
diff --git a/src/types/ChatJoinRequest.zig b/src/types/ChatJoinRequest.zig
index f08e070..194871d 100644
--- a/src/types/ChatJoinRequest.zig
+++ b/src/types/ChatJoinRequest.zig
@@ -6,5 +6,5 @@ chat: Chat,
6from: User, 6from: User,
7user_chat_id: i64, 7user_chat_id: i64,
8date: u64, 8date: u64,
9bio: ?[]const u8, 9bio: ?[]const u8 = null,
10invite_link: ?ChatInviteLink, 10invite_link: ?ChatInviteLink = null,
diff --git a/src/types/ChosenInlineResult.zig b/src/types/ChosenInlineResult.zig
index e0528cd..46ba207 100644
--- a/src/types/ChosenInlineResult.zig
+++ b/src/types/ChosenInlineResult.zig
@@ -4,5 +4,5 @@ const User = @import("User.zig");
4result_id: []const u8, 4result_id: []const u8,
5from: User, 5from: User,
6location: ?Location = null, 6location: ?Location = null,
7inline_message_id: ?[]const u8, 7inline_message_id: ?[]const u8 = null,
8query: []const u8, 8query: []const u8,
diff --git a/src/types/Document.zig b/src/types/Document.zig
index 811273d..e4d6a32 100644
--- a/src/types/Document.zig
+++ b/src/types/Document.zig
@@ -3,6 +3,6 @@ const PhotoSize = @import("PhotoSize.zig");
3file_id: []const u8, 3file_id: []const u8,
4file_unique_id: []const u8, 4file_unique_id: []const u8,
5thumbnail: ?PhotoSize = null, 5thumbnail: ?PhotoSize = null,
6file_name: ?[]const u8, 6file_name: ?[]const u8 = null,
7mime_type: ?[]const u8, 7mime_type: ?[]const u8 = null,
8file_size: ?u64 = null, 8file_size: ?u64 = null,
diff --git a/src/types/EncryptedPassportElement.zig b/src/types/EncryptedPassportElement.zig
index ca0e2ed..2f9c5fd 100644
--- a/src/types/EncryptedPassportElement.zig
+++ b/src/types/EncryptedPassportElement.zig
@@ -19,12 +19,12 @@ pub const Type = enum {
19}; 19};
20 20
21type: Type, 21type: Type,
22data: ?[]const u8, 22data: ?[]const u8 = null,
23phone_number: ?[]const u8, 23phone_number: ?[]const u8 = null,
24email: ?[]const u8, 24email: ?[]const u8 = null,
25files: ?[]PassportFile, 25files: ?[]PassportFile = null,
26front_side: ?PassportFile, 26front_side: ?PassportFile = null,
27reverse_side: ?PassportFile, 27reverse_side: ?PassportFile = null,
28selfie: ?PassportFile, 28selfie: ?PassportFile = null,
29translation: ?[]PassportFile, 29translation: ?[]PassportFile = null,
30hash: []const u8, 30hash: []const u8,
diff --git a/src/types/InlineQuery.zig b/src/types/InlineQuery.zig
index 7cbbe20..47da2cb 100644
--- a/src/types/InlineQuery.zig
+++ b/src/types/InlineQuery.zig
@@ -13,5 +13,5 @@ id: []const u8,
13from: User, 13from: User,
14query: []const u8, 14query: []const u8,
15offset: []const u8, 15offset: []const u8,
16chat_type: ?ChatType, 16chat_type: ?ChatType = null,
17location: ?Location, 17location: ?Location = null,
diff --git a/src/types/PollAnswer.zig b/src/types/PollAnswer.zig
index 7d4985c..f6aca35 100644
--- a/src/types/PollAnswer.zig
+++ b/src/types/PollAnswer.zig
@@ -2,6 +2,6 @@ const Chat = @import("Chat.zig");
2const User = @import("User.zig"); 2const User = @import("User.zig");
3 3
4poll_id: []const u8, 4poll_id: []const u8,
5voter_chat: ?Chat, 5voter_chat: ?Chat = null,
6user: ?User, 6user: ?User = null,
7option_ids: []u64, 7option_ids: []u64,
diff --git a/src/types/PreCheckoutQuery.zig b/src/types/PreCheckoutQuery.zig
index 48e013f..fe80ce5 100644
--- a/src/types/PreCheckoutQuery.zig
+++ b/src/types/PreCheckoutQuery.zig
@@ -6,5 +6,5 @@ from: User,
6currency: []const u8, 6currency: []const u8,
7total_amount: u64, 7total_amount: u64,
8invoice_payload: []const u8, 8invoice_payload: []const u8,
9shipping_option_id: ?[]const u8, 9shipping_option_id: ?[]const u8 = null,
10order_info: ?OrderInfo, 10order_info: ?OrderInfo = null,
diff --git a/src/types/SwitchInlineQueryChosenChat.zig b/src/types/SwitchInlineQueryChosenChat.zig
index 860f2d9..404b08e 100644
--- a/src/types/SwitchInlineQueryChosenChat.zig
+++ b/src/types/SwitchInlineQueryChosenChat.zig
@@ -1,4 +1,4 @@
1query: ?[]const u8, 1query: ?[]const u8 = null,
2allow_user_chats: ?bool = null, 2allow_user_chats: ?bool = null,
3allow_bot_chats: ?bool = null, 3allow_bot_chats: ?bool = null,
4allow_group_chats: ?bool = null, 4allow_group_chats: ?bool = null,
diff --git a/src/types/message_origin.zig b/src/types/message_origin.zig
index 5ca1f9f..96af076 100644
--- a/src/types/message_origin.zig
+++ b/src/types/message_origin.zig
@@ -15,13 +15,13 @@ pub const MessageOrigin = union(enum) {
15 chat: struct { 15 chat: struct {
16 date: u64, 16 date: u64,
17 sender_chat: Chat, 17 sender_chat: Chat,
18 author_signature: ?[]const u8, 18 author_signature: ?[]const u8 = null,
19 }, 19 },
20 channel: struct { 20 channel: struct {
21 date: u64, 21 date: u64,
22 chat: Chat, 22 chat: Chat,
23 message_id: u64, 23 message_id: u64,
24 author_signature: ?[]const u8, 24 author_signature: ?[]const u8 = null,
25 }, 25 },
26 26
27 pub const jsonParse = json.makeJsonParse(MessageOrigin); 27 pub const jsonParse = json.makeJsonParse(MessageOrigin);