Closed mccoysc closed 1 year ago
This is an API error only triggered by the telegram server
, meaning your bot token is used in another bot, maybe Hotbot or another bot program. Check your token first. If you are not sure, please create another bot token.
This is an API error
only triggered by the telegram server
, meaning your bot token is used in another bot, maybe Hotbot or another bot program. Check your token first. If you are not sure, please create another bot token.
no,i have fixed the issue by
if(process.bot) return process.bot;
process.bot=bot
the old code may call init multiply times.
That does not make any sense.
That does not make any sense.
the issue is a bug,not as you said "use bot at other place". it's caused by call "init" multiply times
You should only initiate one time for a bot. And using process.bot
is a bad idea for this "fix". You can keep your own version, but I am not going to follow. Sorry.
You should only initiate one time for a bot. And using
process.bot
is a bad idea for this "fix". You can keep your own version, but I am not going to follow. Sorry.
the init called many times in utilitas/lib/bot.js.
it should be fixed by some way
Could you tell me how you initiated the bot multiple times?
Could you tell me how you initiated the bot multiple times?
No, init func will not create a new instance. It will get the instance one instead because these two lines call the init func without options: https://github.com/Leask/utilitas/blob/master/lib/bot.mjs#LL680C5-L680C5
Init
means get
or init
.
Init
meansget
orinit
.
but after i add THE CODE,the issue is fixed
There should be another issue hidden. We run more than ten different instances. You are the first one facing this. This func is stable enough.
Try removing your fix
and creating a new token. If you can reproduce this issue, please let me know.
after this,all error disapeared.
from this point, there are definitely cases where init is called repeatedly.
Try removing your
fix
and creating a new token. If you can reproduce this issue, please let me know.
the token is newly created for the deploy,no any one else know it.
I cloned your branch removed this fix, and can not reproduce this issue. 🤔️ Please just let me reproduce it.
you can deploy it without the fix to railway for test
I cloned your branch removed this fix, and can not reproduce this issue. 🤔️ Please just let me reproduce it.
i have modified the dependency to my fixed version in package.json
maybe you are still using my version
as the title