(msg: Api.Message, text: string)
| 179 | message: `📋 <b>续 ${index}/${chunks.length - 1}</b>\n\n${chunks[index]}`, |
| 180 | parseMode: "html", |
| 181 | linkPreview: false, |
| 182 | }); |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | function formatDaysAgo(date: Date): string { |
| 187 | const diffDays = Math.floor((Date.now() - date.getTime()) / DAY_MS); |
| 188 | return `${Math.max(0, diffDays)} 天前`; |
| 189 | } |
| 190 | |
| 191 | function formatAvgPerDay(value: number): string { |
| 192 | return value.toFixed(2).replace(/\.?0+$/, ""); |
| 193 | } |
| 194 | |
| 195 | function getLastOnlineDays(user: Api.User): number | null { |
| 196 | if (!user.status) return null; |
| 197 | if ( |
| 198 | user.status instanceof Api.UserStatusOnline || |
| 199 | user.status instanceof Api.UserStatusRecently |
no test coverage detected