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

Created create_invite_link.py #1558

Merged
merged 1 commit into from
May 20, 2022
Merged

Conversation

istoleabread
Copy link
Contributor

Added create_chat_invite_link() function example

Description

This is an example code on how to create invite links for groups automatically via bot

Describe your tests

1 week test using custom bot and a group, works like a charm

Python version: 3.9

OS: Ubuntu 22.04 LTS

Added create_chat_invite_link() func example
@Badiboy
Copy link
Collaborator

Badiboy commented May 20, 2022

Thank you!

@Badiboy Badiboy merged commit 0f44fd3 into eternnoir:master May 20, 2022
@damnkrat
Copy link
Contributor

damnkrat commented May 21, 2022

@devadvik Why don't check your code before make pull request?
@Badiboy Why don't you check before merge?

This code can't even start

I decided to check and fix all the examples, and this one won't even start. You don't have to fix it yet, because I'm already in the process of fixing all sorts of examples.

I'm wondering how the pool requests are checked

@istoleabread
Copy link
Contributor Author

istoleabread commented May 21, 2022

@dannkunt What error are you getting? I'm literally running the same code for another group for about 2 weeks or so and it works perfetly fine.
What error are you running into?

@damnkrat
Copy link
Contributor

damnkrat commented May 21, 2022

@devadvik
изображение
There are no markups in telebot directly, they are in telebot.types.
You missed the comma on the line 24
And that's at the end of the code?

@coder2020official
Copy link
Collaborator

Bad example. Please improve the example

@istoleabread
Copy link
Contributor Author

@dannkunt Oh yep, I wrote the import lines myself and then copied the rest. Seems like I forgot putting .types, apologies for that, I'll fix it asap

@coder2020official
Copy link
Collaborator

Do not forget to remove while True for polling, and threading module which is not used.

@Badiboy
Copy link
Collaborator

Badiboy commented May 21, 2022

@dannkunt So much ado about nothing. You'll loose less time to fix then to write here.
#1564

@istoleabread
Copy link
Contributor Author

@coder2020official Why is while loop for polling bad?

@damnkrat
Copy link
Contributor

@Badiboy I am already reworking examples, what if there was a virus in the example? How do you check pull requests?
изображение

@istoleabread
Copy link
Contributor Author

@dannkunt Code is checked for basic functionalities, just not thoroughly I guess. At a glance, you can determine if all the written lines are related to pyTelegramBotAPI and do stuff, but not enough to check minor mistakes.
That's why I guess this mistake was merged

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.

None yet

4 participants