[WordPress] 外掛分享: Telegram Bot Master

WordPress 外掛 Telegram Bot Master 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Telegram Bot Master」是 2022-04-12 上架。
  • 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
  • 上一次更新是 2022-09-27,距離現在已有 950 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.9 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.2 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

webxid |

外掛標籤

bot | mailing | telegram | messaging | Responder |

內容簡介

GitHub專案:https://github.com/bots-master/wp-bots-master

功能列表
– Telegram機器人整合
– 發送訊息給所有Telegram機器人訂閱者
– 發送訊息至Telegram群組聊天中
– 發送訊息至Telegram頻道中

系統需求

需要PHP版本7.2或以上

移除外掛程式

想要完全刪除外掛程式,請按以下步驟執行:
1. 刪除DB資料表wx_bot_users:

SQL查詢:DROP TABLE IF EXISTS wx_bot_users;

移除WP選項:

delete_option(‘telegram_api_token’);
delete_option(‘welcome_message’);
delete_option(‘unknown_message’);

完成!現在資料庫中已不含此外掛程式的資料

如何使用
收集訂閱者

!!! 重要 !!!
如果使用者在機器人程式安裝之前已訂閱了機器人,這個功能將無法使用。
此外掛程式無法從Telegram那邊取得您機器人的舊訂閱者。

因此,以下步驟完成後您才可以傳送訊息給訂閱者
1. 在WP管理員中設定Telegram機器人API Token
2. 使用者訂閱機器人(傳送任何訊息或按任何按鈕)

現在您可以傳送訊息給訂閱者了。

群組聊天 / 頻道

新增群組聊天 / 頻道到聊天機器人

前往Telegram並建立一個公開的群組聊天或頻道(聊天室)
將您的機器人加入該聊天室。它必須能夠張貼訊息。
複製聊天室的username
前往 Bot Master > Channels 並在此處新增username

現在,當您在 Bot Master > Send Message中傳送訊息時,您的機器人會將該訊息發佈到聊天室中

程式碼用法
使用 WebXID\BotsMaster\ChatBot;
使用 WebXID\BotsMaster\ChatBot\BotUser;

BotUser::find(['type_id' => ChatBot\BotUser::TYPE_CHAT]); // 返回所有群組聊天和頻道列表
BotUser::find(['type_id' => ChatBot\BotUser::TYPE_USER]); // 返回所有訂閱者

BotUser::all(); // 返回所有記錄

// -------------------------

$bot_user = BotUser::findOne(['type_id' => ChatBot\BotUser::TYPE_USER]);

if ($bot_user) {
ChatBot::factory($bot_user)
->sendMessage('Hello world!'); // 如果外掛程式正確安裝,將傳送訊息
}

請查看文件https://core.telegram.org/bots/api#html-style以獲取允許的HTML標記

原文外掛簡介

GitHub project: https://github.com/bots-master/wp-bots-master
The features list
– Telegram Bot integration
– Send a message to all Telegram Bot’s Subscribers
– Send a message to Telegram Group Chat
– Post a message in Telegram Channel
Requirements
PHP version 7.2 or later
Uninstall The Plugin
To uninstall the plugin permanently, follow the next steps:
1. Drop the DB table wx_bot_users:
SQL Query: DROP TABLE IF EXISTS wx_bot_users;

Remove WP Options:
delete_option(‘telegram_api_token’);
delete_option(‘welcome_message’);
delete_option(‘unknown_message’);

Done! Now, there is no data of the plugin in DB
How To Use
Collect Subscribers
!!! IMPORTANT !!!
If a user was subscribed to a bot before the bot installing, it will not works.
The plugin does not able to grab your bot’s old subscribers from the Telegram side.
So, you are able to message users after the next steps
1. Set a Telegram Bot API Token in WP Admin
2. A user subscribe to the bot (send any message or click any button)
Now, you are able to message the subscriber.
Group Chat / Channel
Add Group Chat / Channel to The Chatbot

Go to the Telegram and create public a Group Chat or a Channel (Chat)
Add your Bot to the Chat. It has to be able to post a message.
Copy the Chat username
Go to Bot Master > Channels and add the username here

Now, your bot will posts a message to the Chat, you send at Bot Master > Send Message
Code Usage
use WebXID\BotsMaster\ChatBot;
use WebXID\BotsMaster\ChatBot\BotUser;

BotUser::find(['type_id' => ChatBot\BotUser::TYPE_CHAT]); // returns all Group Chats and Channels list
BotUser::find(['type_id' => ChatBot\BotUser::TYPE_USER]); // returns all subscribers

BotUser::all(); // returns all records

// -------------------------

$bot_user = BotUser::findOne(['type_id' => ChatBot\BotUser::TYPE_USER]);

if ($bot_user) {
ChatBot::factory($bot_user)
->sendMessage('Hello world!'); // will send the message, if the plugin installed correctly
}

Please, check the Doc https://core.telegram.org/bots/api#html-style to get allowed HTML tags

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Telegram Bot Master」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | 1.0.1 | trunk |

延伸相關外掛(你可能也想知道)

  • Facebook Chat Plugin – Live Chat Plugin for WordPress 》在您的網站上使用 Messenger 聊天與客戶溝通。Chat Plugin 是由 Meta Business 維護的聊天小工具,可在您的網站上提供即時聊天。, 網站訪客不論使用電腦或手...。
  • Better Messages – Live Chat for WordPress, BuddyPress, PeepSo, Ultimate Member, BuddyBoss 》「Better Messages」是一款適用於 WordPress、BuddyPress、BuddyBoss 平台、Ultimate Member 和 PeepSo 等其他 WordPress 網站的即時私人訊息系統外掛程式。...。
  • Front End PM 》Front End PM 是一個透過 WordPress 網站進行私人訊息傳送的外掛程式。這是一個完整的前端訊息傳送系統,使用者可以直接在網站前端進行訊息傳送,而不需要進...。
  • Userlike – WordPress Live Chat plugin 》Userlike 是一個針對 WordPress 的即時聊天外掛,可以透過網站聊天和訊息應用程式 (如 WhatsApp、Facebook、Telegram、Threema 和 SMS) 直接與您的客戶連線。...。
  • BuddyPress Edit Activity 》讓您的 BuddyPress 成員在網站前端編輯他們的活動文章和回覆。您甚至可以設定一個時間限制,決定活動文章可以編輯的時間長度。, 只需啟用此外掛,每個活動文...。
  • Chat Floating Button BY XD 》總結:透過這個 WordPress 外掛,您可以在網站上添加浮動的 WhatsApp 聊天按鈕,與訪客透過他們喜歡的聊天工具 WhatsApp 進行溝通,並在網站底部顯示聊天圖標...。
  • Better Messages – WCFM Integration 》Better Messages 外掛與 WCFM 外掛整合。, 允許使用私人訊息系統連接賣家和買家。, 。
  • Mass Messaging in BuddyPress 》這個外掛程式是專為 BuddyPress 設計,它會新增一個儀錶板選單和一個標籤至訊息區。當您進入訊息區並點選「群體訊息」標籤,您就可以存取在儀錶板中選擇的所...。
  • Chat Support for Viber – Chat Bubble and Chat Button for Gutenberg, Elementor and Shortcode 》Viber聊天WordPress外掛程式能輕鬆地在您的WordPress網站上加入Viber聊天小工具,讓您或您的企業能夠透過普及的訊息及語音通話應用程式Viber,輕鬆地與您的網...。
  • BuddyPress Messaging Control 》這個外掛程式非常適合您若想要利用訊息來區別或營利您的BP網站。同時,它也可以控制內部垃圾郵件。您可以控制對訊息的存取權限以及使用者可以消息哪些其他使...。
  • Better Messages – Integration for WC Vendors Marketplace 》。
  • BuddyPress Restrict Messages 》這個外掛非常適合用來防止私人訊息的垃圾郵件。它允許網站管理員和使用者自行決定誰可以對使用者發送訊息。, 這個外掛會建立一個名為 Restrict Messages 的管...。
  • TalkJS 》TalkJS 外掛讓您可以輕鬆地在您的市集、即時應用程序或社交平台上添加使用者間的聊天功能,並且只需要 5 分鐘便可上線。它可以完全整合 WooCommerce 及市集/...。
  • Bonjoro 》在我們的部落格上閱讀更多有關該外掛如何運作以及更詳細的安裝指南。。
  • Message Mate 》Message Mate 是一個簡單但很棒的 WordPress 插件,可在您的網站上添加一個滑塊,以促銷一個電話號碼,讓現有和潛在客戶可以一鍵發送簡訊聯繫您或您的員工。,...。

文章
Filter
Apply Filters
Mastodon