Code Monkey home page Code Monkey logo

bot's People

Contributors

pabluk avatar

Watchers

 avatar  avatar  avatar

bot's Issues

Ban non-spammer users

Today a non-spammer user was banned even if he/she joined the group via the invite link.
This was the timeline:

  1. User joins via invite link
  2. Bot detected an auto-join and ban User
  3. Channel admin unban the User
  4. Channel admin disable Bot
  5. User tries again using the same link
  6. Channel admin re-enable the Bot

Below, you'll find payloads received by Bot during these interactions (for privacy reason IDs were edited):

1st connection

{
    "@type": "updateNewMessage",
    "message": {
        "@type": "message",
        "author_signature": "",
        "can_be_deleted_for_all_users": false,
        "can_be_deleted_only_for_self": false,
        "can_be_edited": false,
        "can_be_forwarded": false,
        "chat_id": -1000000000000,
        "contains_unread_mention": false,
        "content": {
            "@type": "messageChatAddMembers",
            "member_user_ids": [
                1234567890
            ]
        },
        "date": 1599811769,
        "edit_date": 0,
        "id": 950000000,
        "is_channel_post": false,
        "is_outgoing": false,
        "media_album_id": "0",
        "reply_to_message_id": 0,
        "restriction_reason": "",
        "sender_user_id": 1234567890,
        "ttl": 0,
        "ttl_expires_in": 0.0,
        "via_bot_user_id": 0,
        "views": 0
    }
}

2nd connection

{
    "@type": "updateNewMessage",
    "message": {
        "@type": "message",
        "author_signature": "",
        "can_be_deleted_for_all_users": false,
        "can_be_deleted_only_for_self": false,
        "can_be_edited": false,
        "can_be_forwarded": false,
        "chat_id": -1000000000000,
        "contains_unread_mention": false,
        "content": {
            "@type": "messageChatJoinByLink"
        },
        "date": 1599817964,
        "edit_date": 0,
        "id": 950000001,
        "is_channel_post": false,
        "is_outgoing": false,
        "media_album_id": "0",
        "reply_to_message_id": 0,
        "restriction_reason": "",
        "sender_user_id": 1234567890,
        "ttl": 0,
        "ttl_expires_in": 0.0,
        "via_bot_user_id": 0,
        "views": 0
    }
}

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.