(message: string)
| 411 | } |
| 412 | |
| 413 | function isPermissionError(message: string): boolean { |
| 414 | const codes = [ |
| 415 | "CHAT_WRITE_FORBIDDEN", |
| 416 | "USER_BANNED_IN_CHANNEL", |
| 417 | "CHAT_ADMIN_REQUIRED", |
| 418 | "CHANNEL_PRIVATE", |
| 419 | "CHAT_SEND_GIFS_DISABLED", |
| 420 | "PEER_FLOOD", |
| 421 | ]; |
| 422 | return codes.some((code) => message.includes(code)); |
| 423 | } |
| 424 | |
| 425 | function extractForwardedMessages(result: Api.TypeUpdates): Api.Message[] { |
| 426 | const forwarded: Api.Message[] = []; |