tgram.js
Version:
Lightweight modern library for telegram bot. use Node.js
29 lines (24 loc) • 899 B
JavaScript
/*
import { TelegramBot } from "tgram.js";
const bot = new TelegramBot({
token: "",
prefix: "#"
});
bot.commands("info", async (tg) => {
//await tg.reply("Info kamu sudah dikirim ke log bot.");
//await tg.sendAudio("https://files.catbox.moe/yz2vmd.mp3", "rewitre the stars.mp3", "Ini")
//await tg.sendSticker("https://files.catbox.moe/xmbxsj.png", "sticker.webp")
let buffer = Buffer.from("Hai Jawa")
await bot.sendDocumentMessage(tg.jid, buffer, "jawa.txt", "Bokep")
await tg.sendButton("Hai", ["Hai Lonte", "lonte_hai"], {
})
});
bot.commands("ytmp3", async (tg, text) => {
if (!text) return tg.reply("Please Enter A URL YouTube")
const { data } = await axios.get(`https://velyn.biz.id/api/downloader/youtube?url=${text}&type=audio`)
const { downloadUrl } = data.data
await tg.sendAudio(downloadUrl, `${data.data.title}.mp3`)
})
bot.setup()
await bot.start()
*/