()
| 78 | const client = await getGlobalClient(); |
| 79 | if (!client) return; |
| 80 | |
| 81 | // 使用Telegram原始API获取贴纸包 |
| 82 | this.stickerSet = await client.invoke( |
| 83 | new Api.messages.GetStickerSet({ |
| 84 | stickerset: new Api.InputStickerSetShortName({ |
| 85 | shortName: "luxiaoxunbs" |
| 86 | }), |
| 87 | hash: 0 |
| 88 | }) |
| 89 | ); |
| 90 | |
| 91 | console.log(`[${this.PLUGIN_NAME}] 贴纸包加载成功`); |
| 92 | } catch (error) { |
| 93 | console.error(`[${this.PLUGIN_NAME}] 贴纸包加载失败:`, error); |
| 94 | this.stickerSet = null; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | // 获取当前小时对应的贴纸 |
| 99 | private async getHourSticker(): Promise<any> { |
| 100 | if (!this.stickerSet) { |
| 101 | await this.loadStickerSet(); |
| 102 | } |
| 103 |
no test coverage detected