Closed altfoxie closed 5 years ago
what is your Nim version? and your cpu? do you using 32bit?
on versions 0.19.4 and 0.19.9 it's crashs. i am using x64 cpu and os.
what is your Nim version? and your cpu? do you using 32bit?
hmm strange, it still works fine for me. make sure you have latest telebot version.
I have updated telebot. It still crash
hmm strange, it still works fine for me. make sure you have latest telebot version.
I created new bot, which not in group - no crashs
please insert these lines bellow import section. and show me what it got before crashes:
var L = newConsoleLogger(fmtStr="$levelname, [$time] ")
addHandler(L)
Error in chat id. Maybe chat id is bigger than max permissible value of int
DEBUG, [22:03:07] Making request to https://api.telegram.org/botBOTTOKEN/getUpdates
DEBUG, [22:03:08] Result: [
{
"update_id": 813247778,
"message": {
"message_id": 28135,
"from": {
"id": 372525970,
"is_bot": false,
"first_name": "макс �️�⃠",
"username": "MaKcyHOf"
},
"chat": {
"id": -1001457161642,
"title": "LC | FX 6300",
"username": "l_chat",
"type": "supergroup"
},
"date": 1551206490,
"new_chat_participant": {
"id": 707209775,
"is_bot": true,
"first_name": "jddjdj",
"username": "ndxjjskskbot"
},
"new_chat_member": {
"id": 707209775,
"is_bot": true,
"first_name": "jddjdj",
"username": "ndxjjskskbot"
},
"new_chat_members": [
{
"id": 707209775,
"is_bot": true,
"first_name": "jddjdj",
"username": "ndxjjskskbot"
}
]
}
}
]
main.nim(20) main
api.nim(652) poll
utils.nim(94) unmarshal
utils.nim(155) toOption
utils.nim(96) unmarshal
json.nim(1004) unmarshal
system.nim(3059) sysFatal
Error: unhandled exception: value out of range: -1001457161642 [RangeError]
please insert these lines bellow import section. and show me what it got before crashes:
var L = newConsoleLogger(fmtStr="$levelname, [$time] ") addHandler(L)
I think you compiled the program for 32bit CPU. But this is a bug anyway, I will fix it soon.
after this update i needed to update some int
s in my bot to int64
which is to be expected, but then compiler complained that newPhoto
proc accepts int
, but not int64
, so now i need to convert it back to int
and it seems like its asking to break. have you missed something or am i misunderstanding?
Can you give me the code?
https://github.com/ba0f3/telebot.nim/blob/master/telebot/types.nim#L30 chat id is int64 https://github.com/ba0f3/telebot.nim/blob/master/telebot/api.nim#L13 here you changed chat_id property to int64 only on message type
oh my bad, im gonna fix it rn
Hello! When i start my program with any token - RangeError Program: