errors: provide an error bot is not channel chat member (#659)

* errors: provide an error bot is not channel chat member

* errors: refactor
v3.3
Nash-Well 2 months ago committed by GitHub
parent df250e64a2
commit 5ff8b89b2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -133,6 +133,7 @@ var (
ErrKickedFromChannel = NewError(403, "Forbidden: bot was kicked from the channel chat")
ErrNotStartedByUser = NewError(403, "Forbidden: bot can't initiate conversation with a user")
ErrUserIsDeactivated = NewError(403, "Forbidden: user is deactivated")
ErrNotChannelMember = NewError(403, "Forbidden: bot is not a member of the channel chat")
)
// Err returns Error instance by given description.
@ -250,6 +251,8 @@ func Err(s string) error {
return ErrChannelsTooMuch
case ErrChannelsTooMuchUser.ʔ():
return ErrChannelsTooMuchUser
case ErrNotChannelMember.ʔ():
return ErrNotChannelMember
default:
return nil
}

Loading…
Cancel
Save