Coder Social home page Coder Social logo

explorebeyondthestars / messagecleanerbot Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 4.0 289 KB

自动删除入群消息和退群消息 a telegram bot that deletes member join chat message or member left chat message

Home Page: https://t.me/messageCleaningExpertBot

License: MIT License

TypeScript 100.00%
telegram telegram-bot

messagecleanerbot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

messagecleanerbot's Issues

删不掉成员被机器人踢出的消息

摘要

正常运行的@messageCleaningExpertBot实例不能够清除由机器人管理员调用/kickChatMember API将群成员踢出群组产生的形如xxxBot removed yyy这样的消息,但是仍可以正常删除由人类管理员手工移除、邀请成员和用户主动加入群组产生的消息.

复现

1.向@BotFater申请一个Bot,并且

let apiToken = BotFater给你的那个api_token

2.在一个@messageCleaningExpertBot存在并且是管理员并且具有删除消息权限的群组中,使你刚才申请的这个Bot成为管理员,然后调用API路径是/kickChatMember将其中一个成员踢出群组

let userID = 将要被踢出的那个用户的user_id,是一个整数

let chatID = 群组的chat_id,同样是一个整数

let client = axios.create({
    "headers": {
        "Content-Type": "application/json"
    }
});

client.post(`/bot${apiToken}/kickChatMember`, {
    "chat_id": chatID,
    "user_id": userID
}).then(r => r.data).then(d => console.log(d)).catch(console.error);

此时群聊界面中会出现xxx removed yyy这样的提示,且咱们的@messageCleaningExpertBot对此无能为力,通过webhook接收到的update中也不包含此条消息.

解决方案

暂无.

定性

因技术难题导致的程序工作异常.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.