-
Notifications
You must be signed in to change notification settings - Fork 0
class Telegram
www/includes/telegrambot.inc.php
In dieser Klasse befinden sich alle Funktionen zum Senden von Telegram-Messages über einen Telegram-Bot
zorg\Messagesystem
- IneX
- 10.06.2018
3.0
-
1.0
Initial Telegram integration -
2.0
Refactoring of sendMessage-Methods in 2 functions: for single User & for Groups -
3.0
Major refactoring of the whole Telegram Integration: Class-Object, Flexible send-Methods, More API-Options support
No public properties found
DISABLE_NOTIFICATION() | DISABLE_WEB_PAGE_PREVIEW() | PARSE_MODE() |
formatText() | mentionUser() | send() |
DISABLE_NOTIFICATION = 'false' :
www/includes/telegrambot.inc.php
DISABLE_WEB_PAGE_PREVIEW = 'false' :
www/includes/telegrambot.inc.php
PARSE_MODE = 'html' :
Define global default Telegram Bot Settings (can be overwritten on a Message level by passing as $parameter)
www/includes/telegrambot.inc.php
- const: TELEGRAM_BOT_PARSE_MODE Specifies the Message Format to use - either empty, Markdown or HTML
- const: TELEGRAM_BOT_DISABLE_WEB_PAGE_PREVIEW Specifies whether link previews for links in the message should be enabled or disabled
- const: TELEGRAM_BOT_DISABLE_NOTIFICATION Specifies whether the Bot's messages should be silent or regular notifications
Cleanup Message for Telegram Messenger Notification
- Inherited from \Telegram
public
formatText(string $notificationText) : string
See also
- author: IneX
- date: 25.05.2018
-
version:
3.0
-
since:
1.0
initial function -
since:
2.0
line breaks are possible using encoded "\n" - won't strip those anymore. Added missing allowedstrong
& . -
since:
3.0
22.10.2018 changed strip_html() to remove_html(), changed order of cleanup, removed valid HTML-Tags due to issue with nested tags
(NOT IMPLEMENTED YET!) Format Link to Mention Telegram User inline
Gibt einen Link aus, welcher Telegram benutzt um einen spezifischen Telegram Benutzer zu @mention. Example: inline mention of a user
- Inherited from \Telegram
public
mentionUser(int $userid) : string
See also
- author: IneX
- date: 25.05.2018
-
version:
1.1
-
since:
1.0
IneX
25.05.2018 Method added -
since:
1.1
IneX
18.04.2020 Code optimization and migration to mysqli_ - TODO: Database column "telegram_user_id" must be added first, for this to work
- TODO: probably it's more common that a userNAME is passed? => needs usersystem::user2id()
- global: object $db Globales Class-Object mit allen MySQL-Methoden
- global: object $user Globales Class-Object mit den User-Methoden & Variablen
Send a Message via Telegram Messenger Schickt eine Notification an die Telegram Chats von Usern
- Inherited from \Telegram
public
send(int|string $userScope, string $messageType, array $content) : bool
See also
- author: IneX
- date: 17.03.2018
-
version:
4.0
-
since:
1.0
- TODO: implement this with TelegramBot\TelegramBotManager\BotManager?
- var: mit aktuellen Telegram-Bot Settings
- global: object $user Globales Class-Object mit den User-Methoden & Variablen
- global: array $botconfigs Array mit allen Telegram Bot-Configs
Validate Data agains Model for various Telegram Message Types
Check for valid parameters and returns Array with key:value pairs assigned This function is related (but no depending!) to the following MySQL-table: - Table: messages_telegram_queue - Column: :method - Column: :content - Column: :content_additional
- Inherited from \Telegram
private
validateData(string $messageType, array $parameters) : array|bool
See also
- author: IneX
- date: 10.06.2018
-
version:
1.0
-
since:
1.0
\ » Classes » Telegram
Documentation generated on April 26th, 2020 at 15:54.
Powered by phpDocumentor with template GitHub-wiki.