Skip to content

Determining if a chat is a group or not to filter #948

Closed Answered by TheAwiteb
MvCast asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @MvCast I think you tried this function with a supergroup not a group, the deference between supergroup and a group is that supergroup have a link (public for all telegram users) and the group is a private. try to check of it's a supergroup also.

- if msg.chat.is_group() {
+ if msg.chat.is_group() || msg.chat.is_supergroup() {

suggestion: Add a check for channels also, or if you want to handle it as a group you can check if the chat not a private chat (DM) then handle it as a group, supergroup and a channel.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MvCast
Comment options

Answer selected by MvCast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants