Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def send_message(message='', peer_id=None, keyboard=None, attachment=None, user_id=None, peer_ids=None, sticker_id=None, payload=None):
- message = str(message)
- if len(message) > 4096:
- result = []
- for i in range(0, len(message), 4096):
- result.append(
- send_message(
- message=message[i: i + 4096],
- peer_id=peer_id,
- peer_ids=peer_ids,
- user_id=user_id,
- attachment=attachment,
- sticker_id=sticker_id,
- payload=payload,
- keyboard=keyboard,
- )
- )
- return True
- return call.messages.send(
- sticker_id=sticker_id,
- user_id=user_id,
- peer_id=peer_id,
- peer_ids=peer_ids,
- attachment=attachment,
- message=message,
- random_id=0,
- payload=payload,
- keyboard=json.dumps(keyboard) if keyboard is not None else None
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement