Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Settings.TestAPI flag to enable using the Telegram test API #742

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

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