(reply: Api.Message)
| 245 | |
| 246 | private static async getReplySender(reply: Api.Message): Promise<any> { |
| 247 | try { |
| 248 | return await (reply as any).getSender?.(); |
| 249 | } catch { |
| 250 | return reply.sender; |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | private static getChatType(message: Api.Message): "channel" | "chat" | "unknown" { |
| 255 | if ((message as any).isChannel) return "channel"; |
| 256 | if ((message as any).isGroup) return "chat"; |