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