Skip to content

Repository files navigation

TeleBot

Daftar isi

Deskripsi

TeleBot adalah skrip bot Telegram yang menggunakan NodeJS dan modul telegraf




Instalasi

Cara menginstal TeleBot

Di Termux :

pkg update -y
pkg upgrade -y
pkg install nano git nodejs -y
git clone https://github.com/MuhammadRestu999/TeleBot
cd TeleBot
npm install



Di Ubuntu, VPS/RDP, etc :

apt update -y
apt upgrade -y
apt install nano git nodejs -y
git clone https://github.com/MuhammadRestu999/TeleBot
cd TeleBot
npm install



Deploy ke heroku : Deploy






Config

Edit file config.json :

NamaBarisDeskripsiWajib
Token2 24Masukkan token bot ke siniYa
Nama Owner3 18Masukkan nama owner ke siniTidak
Id Owner4 24Masukkan id owner ke siniTidak
Tautan Owner5 43Masukkan tautan owner ke sini (https://t.me/username)Tidak
Nomor Owner6 31Masukkan nomor hp owner ke sini (628XXXXXXXXXX)Tidak
Apikey OpenAI9 27Masukkan apikey OpenAI ke siniYa






Tutorial

YouTube






Contoh

Membalas pesan :

ctx.reply("Hello World")



Membalas pesan dengan foto :

// Urlawaitctx.replyWithPhoto("https://static.zerochan.net/Misaki.Mei.full.1315931.jpg")// Bufferawaitctx.replyWithPhoto({source: fs.readFileSync("misaki_mei.png")})// Fileawaitctx.replyWithPhoto({source: "misaki_mei.png"})// Dengan captionawaitctx.replyWithPhoto("https://static.zerochan.net/Misaki.Mei.full.1315931.jpg",{caption: "Misaki Mei"})// Albumawaitctx.replyWithMediaGroup([{media: "https://static.zerochan.net/Misaki.Mei.full.1315931.jpg",caption: "Dari URL",type: "photo"},{media: {source: fs.readFileSync("MisakiMei_1.png")},caption: "Dari Buffer",type: "photo"},{media: {source: "MisakiMei_2.png"},caption: "Dari File",type: "photo"}])



Untuk send video hanya perlu ganti dibagian "Photo" jadi "Video" type juga diganti dengan "video"




Menjalankan bot

Untuk menjalankan bot
Anda hanya perlu mengetik perintah di bawah ini :

node .

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages