(msg: Api.Message | string, n: number)
| 23 | ); |
| 24 | |
| 25 | function getRemarkFromMsg(msg: Api.Message | string, n: number): string { |
| 26 | return (typeof msg === "string" ? msg : msg?.message || "") |
| 27 | .replace(new RegExp(`^\\S+${Array(n).fill("\\s+\\S+").join("")}`), "") |
| 28 | .trim(); |
| 29 | } |
| 30 | // DB schema and helpers |
| 31 | type AcronType = |
| 32 | | "send" |