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

Function buildGameText

epic/epic.ts:109–121  ·  view source on GitHub ↗
(game: EpicGame, index: number)

Source from the content-addressed store, hash-verified

107 const title = htmlEscape(game.title);
108 const desc = game.description.length > 100 ? htmlEscape(game.description.slice(0, 100)) + "..." : htmlEscape(game.description);
109 const start = formatDate(game.startDate);
110 const end = formatDate(game.endDate);
111 const link = game.url ? `<a href="${htmlEscape(game.url)}">🔗 领取</a>` : "";
112
113 return `<b>${index}. ${title}</b>
114💰 原价: <code>${htmlEscape(game.originalPrice)}</code> → <b>免费</b>
115📅 ${start} ~ ${end}
116${desc}
117${link}`;
118}
119
120class EpicPlugin extends Plugin {
121
122 description: string = help_text;
123
124 cmdHandlers: Record<string, (msg: Api.Message) => Promise<void>> = {

Callers 1

EpicPluginClass · 0.85

Calls 2

htmlEscapeFunction · 0.70
formatDateFunction · 0.70

Tested by

no test coverage detected