1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-24 05:36:29 +02:00
Vitaly the Alpaca (bot) 9c977d53e1 Main build (Jenkins)
2024-10-06 16:55:08 +03:00

1.8 KiB

sidebar_position
1

Send text message

Sends a text message to a chat or channel

Function SendTextMessage(Val Token, Val ChatID, Val Text, Val Keyboard = "", Val Markup = "Markdown", Val RepliedID = 0) Export

Parameter CLI option Type Description
Token --token String Bot token
ChatID --chat String, Number Target chat ID or ChatID*TopicID
Text --text String Message text
Keyboard --keyboard String Keyboard JSON or path to .json
Markup --parsemode String Text processing type (HTML, Markdown, MarkdownV2)
RepliedID --reply String, Number Reply to message ID

Returns: Map Of KeyAndValue - Serialized JSON response from Telegram


    Token     = "6129457865:AAFyzNYOAFbu...";
    ChatID    = "461699897";
    ChannelID = "@testsichee";
    Text      = "Строковое значение";

    Result = OPI_Telegram.SendTextMessage(Token, ChatID, Text);

    Result = OPI_Telegram.SendTextMessage(Token, ChannelID, Text);
    
  oint telegram SendTextMessage --token "6129457865:AAFyzNYOAFbu..." --chat "461699897" --text "String value" --keyboard %keyboard% --parsemode %parsemode% --reply %reply%

{
 "ok": true,
 "result": {
  "message_id": 8190,
  "from": {
   "id": 6129457865,
   "is_bot": true,
   "first_name": "Бот Виталий",
   "username": "sicheebot"
  },
  "chat": {
   "id": 461699897,
   "first_name": "Anton",
   "last_name": "Titowets",
   "username": "JKIee",
   "type": "private"
  },
  "date": 1728139209,
  "text": "Строковое значение"
 }
}