-
Notifications
You must be signed in to change notification settings - Fork 8
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
اجرا نکردن get_message #18
Comments
اگر تو پوشه ی |
خطای زیر رو موقع دریافت پیام ها میده کی میدونه علتش چی هست؟؟ |
سلام این کدی که شما دادید فقط به صورت دستی میتونیم ایدی شخص رو وارد کنیم. حالا راهی هست که ربات اول ایدی رو به دست بیاره و بعد به همون ایدی پیام مورد نظر رو بفرسته؟؟ |
ربات نمی تونه آیدی کاربرانی که شروع رو نزدن و عضو نشدن رو پیدا کنه ولی می تونید آی دی تمام کسانی که شروع رو زدن رو تو بانک اطلاعاتی یا هر چی ذخیره کنید تا هرموقع خواستید پیام بدین بهشون |
به نظرم مشکل از خط ۴۴ باشه که مربوط هست به تابع get_message، مشکل اینه که response رو مستقیم فرستاده به تابع. Lines 41 to 46 in aa29653
|
. ارور زیر رو میده وقتی
get_message
رو اجرا میکنم.
Invalid URL '<Response [200]>': No schema supplied. Perhaps you meant http://<Response [200]>?
retry to connect after 10 seconds...
کد رو هم تغییر ندادم. به راحتی پیام ارسال میکنم ولی دریافت رو مشکل دارم!
from sys import path
path.append('..')
from client import Client
bot_token = 'atyJDqAzb0p-*******************J-W'
bot = Client(bot_token)
try:
messages = bot.get_messages()
for message in messages:
print("New message from {} \nType: {}\nBody: {}" .format(message['from'], message['type'], message['body']))
except Exception as e:
print(e.args[0])
The text was updated successfully, but these errors were encountered: