Open judy9712 opened 1 month ago
@judy9712 I've just bumped into this issue and suppressing the error helped, the API with test env still works
// @ts-ignore
new TelegramBot(TOKEN || '', {polling: true, testEnvironment: true});
But it is still an issue with ConstructorOptions
interface. I hope more comments will help devs to see it.
I have read:
I am using the latest version of the library.
I'm trying to connect my bot created in a test environment. However, even though I input the correct bot token, I keep getting a 401 unauthorized error.
this is my code:
and this is my package.json
I saw the testEnvironment option in api docs. However, when I try to input 'testEnvironment' in the options, it says that it's not a valid option. Has the 'testEnvironment' option been removed? How can I develop using a bot deployed in a test environment?