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

Method addCustomEmoji

trace/trace.ts:109–121  ·  view source on GitHub ↗
(placeholder: string, documentId: BigInteger)

Source from the content-addressed store, hash-verified

107 const offset = this.calculateOffset(this.text);
108 const length = placeholder.length; // Simple length calculation
109 this.text += placeholder;
110
111 this.entities.push(
112 new Api.MessageEntityCustomEmoji({
113 offset,
114 length,
115 documentId
116 })
117 );
118 }
119
120 private calculateOffset(text: string): number {
121 // Telegram uses UTF-16 code units for offset calculation
122 return text.length;
123 }
124

Callers 1

traceUserMethod · 0.80

Calls 1

calculateOffsetMethod · 0.80

Tested by

no test coverage detected