MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / api

Method api

src/bot/adapters/telegram.ts:23–30  ·  view source on GitHub ↗
(method: string, body: unknown)

Source from the content-addressed store, hash-verified

21 constructor(private token: string) {}
22
23 private async api(method: string, body: unknown): Promise<any> {
24 const res = await fetch(`https://api.telegram.org/bot${this.token}/${method}`, {
25 method: 'POST',
26 headers: { 'content-type': 'application/json' },
27 body: JSON.stringify(body),
28 });
29 return res.json();
30 }
31
32 private keyboard(buttons?: Button[][]) {
33 if (!buttons) return {};

Callers 8

startMethod · 0.95
loopMethod · 0.95
sendMethod · 0.95
handleVoiceMethod · 0.95
editMethod · 0.95
ackCallbackMethod · 0.95
typingMethod · 0.95
setCommandsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected