Skip to content

Commit cd1e3cf

Browse files
committed
fix chat id size, it may greater than 32 bits but smaller than 52 bits, closes #24
1 parent 25b8506 commit cd1e3cf

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

telebot.nimble

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
version = "0.5.2"
1+
version = "0.5.3"
22
author = "Huy Doan"
33
description = "Async Telegram Bot API Client"
44
license = "MIT"
55
skipDirs = @["examples"]
66

7-
requires "nim >= 0.17.0"
7+
requires "nim >= 0.19.4"

telebot/api.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import httpclient, json, asyncdispatch, utils, strutils, options, strtabs
22

33
magic Message:
4-
chatId: int
4+
chatId: int64
55
text: string
66
parseMode: string {.optional.}
77
disableWebPagePreview: bool {.optional.}

telebot/types.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type
2727
languageCode*: Option[string]
2828

2929
Chat* = object of TelegramObject
30-
id*: int
30+
id*: int64
3131
kind*: string
3232
title*: Option[string]
3333
username*: Option[string]
@@ -216,8 +216,8 @@ type
216216
leftChatMember*: Option[User]
217217
newChatTitle*: Option[string]
218218
newChatPhoto*: Option[seq[PhotoSize]]
219-
migrateToChatId*: Option[int]
220-
migrateFromChatId*: Option[int]
219+
migrateToChatId*: Option[int64]
220+
migrateFromChatId*: Option[int64]
221221
pinnedMessage*: Option[ref Message]
222222
invoice*: Option[Invoice]
223223
successfulPayment*: Option[SuccessfulPayment]
@@ -246,7 +246,7 @@ type
246246
canAddWebPagePreviews*: Option[bool]
247247

248248
ResponseParameters* = object of TelegramObject
249-
migrateToChatId*: Option[int]
249+
migrateToChatId*: Option[int64]
250250
retryAfter*: Option[int]
251251

252252
Update* = object of TelegramObject

0 commit comments

Comments
 (0)