Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Forbidden: bot is not a member of the channel chat" exception #3

Open
karb0f0s opened this issue May 11, 2018 · 9 comments
Open
Assignees
Labels

Comments

@karb0f0s
Copy link
Member

From @tuscen on March 14, 2018 18:59

HTTP code: 403
Error message: Forbidden: bot is not a member of the channel chat

Copied from original issue: TelegramBots/Telegram.Bot#648

@karb0f0s karb0f0s self-assigned this May 11, 2018
@karb0f0s
Copy link
Member Author

How do you get this? Send message to some public channel when you are not its member?

@karb0f0s
Copy link
Member Author

From @tuscen on April 2, 2018 10:23

Either public or private, doesn't matter.

@karb0f0s
Copy link
Member Author

I was able to test this exception in supergroup and channel, it is not thrown for regular group - ChatNotFoundException is thrown instead

@karb0f0s
Copy link
Member Author

@karb0f0s
Copy link
Member Author

anyone can think of better a name?

@karb0f0s
Copy link
Member Author

From @tuscen on April 4, 2018 13:56

It should somehow include word "channel" because it is thrown only for channels.

@karb0f0s
Copy link
Member Author

From @pouladpld on April 4, 2018 14:12

If such errors happen for other chats, we could use general base and derived subclasses.

@karb0f0s
Copy link
Member Author

@tuscen actually it is not true. I have test cases for both channel and supergroup: "bot is not a member of the (supergroup|channel) chat". It is possible to make two different exceptions, but I think it's too much

@karb0f0s
Copy link
Member Author

From @tuscen on April 4, 2018 14:27

@karb0f0s yeah, makes sense to have single type if it can be thrown with slightly different error message for other chats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant