A Telegram Bot for WordPress comments! Simple and fast reply to your comments!
By using this plugin, you agree to open Basic Auth on your WordPress.
Please setup a complex passphrase for your WordPress
-
WordPress native comment system.
-
Network connection to Telegram.
ssh to your blog
cd /path/to/root/wp-content/plugins
git clone https://github.com/BennyThink/wp-comments-tgbot
Then navigate to your Plugin and enable WordPress Comments Telegram Bot.
Talk to @BotFather, create your own bot and copy bot token.
Talk to @get_id_bot, get your own user id.
Fill in your token, user id and proxy if needed.
Create your own config.json
{
"username": "admin",
"password": "admin",
"url": "http://localhost/",
"token": "907J6Tw",
"uid": "23231321",
"admin": 1,
"tail": "本评论由Telegram Bot回复~❤️"
}
Explanations:
- username & password: username and password for WordPress
- url: site url, must include
/
as suffix. - token: Telegram bot token
- uid: your Telegram user id
- admin: your user id in WordPress, typically it should be 1
- tail: suffix message to your reply.
Supply config.json
as -c /path/tp/config.json
. By default it will search on working directory.
chmod u+x /path/to/bot
/path/to/bot -c /path/to/config.json
-c file set configuration file (default "config.json")
-f force to run even on http sites.
-h this help
-v show version and exit
Potentially bug about your theme/plugin. Try to find the code of sending email.
You may find some hook like this:
php add_action('comment_post', 'comment_mail_notify');
Change comment_post
to wp_insert_comment
will solve this issue.
GPLv2