Skip to content

Telegram 自动恢复群组被绑定频道更改的置顶消息

License

Notifications You must be signed in to change notification settings

julydate/tgSetAutoPinMessage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Telegram 自动恢复群组被绑定频道更改的置顶消息

Telegram群组和频道绑定过后,频道发布的消息会自动同步到群组并置顶

使用本机器人可以自动恢复群组被绑定频道更改后的置顶消息为之前人工置顶的消息,亦可自动删除频道转发过来的置顶消息

使用前请先保证机器人拥有群组管理员权限(删除消息和置顶消息的权限)

使用命令如下(只有群组管理员可以进行更改,默认状态下为关闭):

setautopinmessage - 自动恢复置顶消息 on 为开启 off 为关闭
setautodelpinmessage - 自动删除频道置顶消息 on 为开启 off 为关闭

设置 Telegram Bot WebHook:

https://api.telegram.org/bot$token/setWebhook?url=https://example.com/channelBot.php?token=$token

另外需要在本程序同目录下创建 channelbotconfig 文件夹,并在该文件夹里创建一个 config.json 文件,并保证 PHP 对该目录可读写

注意:PHP 需要开启 fopen 函数

About

Telegram 自动恢复群组被绑定频道更改的置顶消息

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages