-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtgterminal.js
42 lines (37 loc) Β· 1.37 KB
/
tgterminal.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import TelegramBot from "node-telegram-bot-api";
import { config } from "./config.js";
const bot = new TelegramBot(config.TOKENs[2], { polling: false });
const qu1z3xId = "923690530";
export async function sendDataAboutText(chatId, firstName, text) {
await bot.sendMessage(
qu1z3xId,
`<b><a href="https://t.me/digschbot">π€</a> #digsch | Text\n\n<a href="tg://user?id=${chatId}">${firstName}</a> | </b><code>${chatId}</code>\n<blockquote><i>${text}</i></blockquote>`,
{
parse_mode: "html",
disable_notification: true,
disable_web_page_preview: true,
}
);
}
export async function sendDataAboutButton(chatId, firstName, data) {
await bot.sendMessage(
qu1z3xId,
`<b><a href="https://t.me/digschbot">π€</a> #digsch | Button\n\n<a href="tg://user?id=${chatId}">${firstName}</a> | </b><code>${chatId}</code>\n<blockquote><b>[${data}]</b></blockquote>`,
{
parse_mode: "html",
disable_notification: true,
disable_web_page_preview: true,
}
);
}
export async function sendDataAboutError(chatId, firstName, text) {
await bot.sendMessage(
qu1z3xId,
`<b><a href="https://t.me/digschbot">π€</a> #digsch | βοΈ ERROR βοΈ\n\n<a href="tg://user?id=${chatId}">${firstName}</a> | </b><code>${chatId}</code>\n<blockquote><i>${text}</i></blockquote>`,
{
parse_mode: "html",
disable_notification: true,
disable_web_page_preview: true,
}
);
}