(amount: number, totalValue: number, price: number, cryptoSymbol: string, fiatSymbol: string, lastUpdated: Date)
| 602 | `💎 <b>当前汇率:</b> ${codeTag(`1 ${cryptoSymbol} = ${this.formatPrice(price)} ${fiatSymbol}`)}\n` + |
| 603 | `⏰ <b>数据更新:</b> ${lastUpdated.toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}`; |
| 604 | } |
| 605 | |
| 606 | private buildPriceResponse(price: number, cryptoSymbol: string, fiatSymbol: string, lastUpdated: Date): string { |
| 607 | return `💱 <b>汇率</b>\n\n` + |
| 608 | `${codeTag(`1 ${cryptoSymbol} = ${this.formatPrice(price)} ${fiatSymbol}`)}\n\n` + |
| 609 | `⏰ <b>数据更新:</b> ${lastUpdated.toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}`; |
| 610 | } |
| 611 | |
| 612 | private async handleRate(msg: Api.Message): Promise<void> { |
| 613 | const text = msg.text?.trim() || ""; |
no test coverage detected