We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from zlapi import ZaloAPI from zlapi.models import *
imei, session_cookies = load_config()
class Bot(ZaloAPI):
def __init__(self, api_key, secret_key, imei=None, session_cookies=None): super().__init__(api_key, secret_key, imei, session_cookies) def onEvent(self, event_data, event_type): print(event_data, event_type) def onMessage(self, mid, author_id, message, message_object, thread_id, thread_type): self.markAsDelivered(mid, message_object.cliMsgId, author_id, thread_id, thread_type, message_object.msgType) print(f"{message}")
bot = Bot('api_key', 'secret_key', imei=imei, session_cookies=session_cookies) bot.listen(run_forever=True, delay=0, thread=True)
The text was updated successfully, but these errors were encountered:
What is the error?
Sorry, something went wrong.
nó không nhận sự kiện onEvent như code trên tôi chạy nó không in ra được print(event_data, event_type)
No branches or pull requests
from zlapi import ZaloAPI
from zlapi.models import *
imei, session_cookies = load_config()
class Bot(ZaloAPI):
bot = Bot('api_key', 'secret_key', imei=imei, session_cookies=session_cookies)
bot.listen(run_forever=True, delay=0, thread=True)
The text was updated successfully, but these errors were encountered: