GithubHelp home page GithubHelp logo

telebotko's Introduction

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-lts -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-lts -y
git clone https://github.com/MuhammadRestu999/TeleBot
cd TeleBot
npm install



Deploy ke heroku : Deploy






Config

Edit file config.json :

Nama Baris Deskripsi Wajib
Token 2 30 Masukkan token bot ke sini Ya
Nama Owner 3 18 Masukkan nama owner ke sini Tidak
Id Owner 4 26 Masukkan id owner ke sini Tidak
Tautan Owner 5 43 Masukkan tautan owner ke sini (https://t.me/username) Tidak
Nomor Owner 6 31 Masukkan nomor hp owner ke sini (628XXXXXXXXXX) Tidak






Tutorial

YouTube






Contoh

Membalas pesan :

ctx.reply("Hello World")



Membalas pesan dengan foto :

// Url
await ctx.replyWithPhoto("https://static.zerochan.net/Misaki.Mei.full.1315931.jpg")

// Buffer
await ctx.replyWithPhoto({
  source: fs.readFileSync("misaki_mei.png")
})

// File
await ctx.replyWithPhoto({
  source: "misaki_mei.png"
})

// Dengan caption
await ctx.replyWithPhoto("https://static.zerochan.net/Misaki.Mei.full.1315931.jpg", {
  caption: "Misaki Mei"
})

// Album
await ctx.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 .

telebotko's People

Contributors

rizxyu avatar muhammadrestu999 avatar xcrtslax avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.