Skip to content

Conversation

@TheoBrigitte
Copy link

This PR add the capability to use the Telegram test API in order to help with bot development. The test API setup is describe in the official documentation here https://core.telegram.org/bots/features#creating-a-bot-in-the-test-environment.

After having created a bot in the Telegram test environment you can now create the bot using the new TestAPI setting.

pref := tele.Settings{
	Token:   telegramBotToken,
	TestAPI: true,
}

b, err := tele.NewBot(pref)

I tested this including the file API, I hope I did not missed anything.

@TheoBrigitte TheoBrigitte changed the title Add Settings.TestAPI flag to enable using the Telegram test API Add Settings.TestAPI flag to enable using the Telegram test API Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant