Telegram code development -- 2

Job ID: 37974698

Budget: $750 – $1,500 USD

Hiring technical personnel can achieve complete development of the following code in practice. There may be something wrong with the code below, but there is project direction. pip install telethon Import TelegramClient from telethon.sync Import functions from telethon.tl # Create Telegram client with your API ID and API hash api_id = 'Your API_ID' api_hash = 'YOUR_API_HASH' Client = TelegramClient('session_name', api_id, api_hash) Asynchronous def send_dice(chat_id, dice_face): Asynchronously with client: result=awaitClient(functions.messages.SendInlineBotResultRequest( peer = chat id, Query id=0, id='robot command', silence=false, Scheduled Date = None, background=false, cleardraft=false, hide_via=true, selected=[dice_face] # 1-6 are ordinary dice )) print(result) # Fill in your account mobile phone number and password here Phone = "YOUR_PHONE_NUMBER" password='your password' # Log in to Telegram group client.start(phone, password) # Fill in the chat ID that sends the dice and the value of the dice Chat ID = 'Chat ID' dice_value = '6' # 1-6 are ordinary dice # Send dice client.loop.run_until_complete(send_dice(chat_id, dice_value))
Related categories: Python Telegram Moderation Telegram API