如何收到电报群左转通知?
How to be notified of the Left of the telegram group?
我在 telegram
中建造了 Bot
。
当用户是组的 member
时。 ,我Save
记录在数据库中,(工作notified
发送到组)
当成员 Left
组时,我将 Delete
这条记录,
但是我在群里don't notify
我该怎么做?
您应该在用户离开时收到 Message 更新,包括 left_chat_member
字段,这不像普通消息那样在 text
字段中。
您在评论中提到您正在使用 Telegram 超级群组进行测试。
Telegram 不在超级群组中发送 "member left chat" 通知:
Supergroups are muted by default and send fewer joined/left notifications.
我有想法了
我调用了promoteChatMember
函数。 [通过参数chat_id
,user_id
]
另一个参数默认值。
那么这个函数 return result
"ok"=true
.
我知道是在群里
希望解决方案
我找到了解决方案。
getChatMember
带参数 chat_id
user_id
是return。
数组([ok] => 1 [结果] => 数组([用户] => 数组([id] => 102281811 [first_name] => SM )[状态] => 左) )
[状态] 为 left/member
我在 telegram
中建造了 Bot
。
当用户是组的 member
时。 ,我Save
记录在数据库中,(工作notified
发送到组)
当成员 Left
组时,我将 Delete
这条记录,
但是我在群里don't notify
我该怎么做?
您应该在用户离开时收到 Message 更新,包括 left_chat_member
字段,这不像普通消息那样在 text
字段中。
您在评论中提到您正在使用 Telegram 超级群组进行测试。
Telegram 不在超级群组中发送 "member left chat" 通知:
Supergroups are muted by default and send fewer joined/left notifications.
我有想法了
我调用了promoteChatMember
函数。 [通过参数chat_id
,user_id
]
另一个参数默认值。
那么这个函数 return result
"ok"=true
.
我知道是在群里
希望解决方案
我找到了解决方案。
getChatMember
带参数 chat_id
user_id
是return。 数组([ok] => 1 [结果] => 数组([用户] => 数组([id] => 102281811 [first_name] => SM )[状态] => 左) )
[状态] 为 left/member