MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / loadStickerSet

Method loadStickerSet

lu_bs/lu_bs.ts:80–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 3

setupMethod · 0.95
getHourStickerMethod · 0.95
handleReloadMethod · 0.95

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected