Skip to content

Instantly share code, notes, and snippets.

@behnamonline
behnamonline / btc.py
Created September 14, 2025 17:45
Bitcoin price Binance WebSocket
# https://www.youtube.com/@behnamonline
import websocket
import json
import os
coin = "btc"
pair = "usdt"
symbol = f"{coin}{pair}".lower()
@behnamonline
behnamonline / worker.js
Last active September 8, 2025 20:54
GhoreKeshi
// bind a D1 database to the worker , name it: dblink
// run your worker https://.....workers.dev/init to set webhook and create users table
const BOT_TOKEN = '7492366949:AAENq_vvsIGOKFJC-2x2TW8A2JpJ2gACLAKC'
const HOOK = BOT_TOKEN.split(":")[0]
export default {
async fetch(request, env, ctx) {
const botDB = env.dblink;
@behnamonline
behnamonline / worker.js
Last active August 30, 2025 16:15
Web Scraper to Telegram Bot
/*
create a KV and bind to your worker -> kv_link
*/
const pageUrl = "https://ledc.ir/%D8%AE%D8%A7%D9%85%D9%88%D8%B4%DB%8C%D9%87%D8%A7%DB%8C-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D8%B1%DB%8C%D8%B2%DB%8C-%D8%B4%D8%AF%D9%87";
const botToken = "2365785233:AAG7afaplinQtnGgLvfgEgsAhbUQERSSYXFo";
const chatId = "@barghmire";
@behnamonline
behnamonline / worker.js
Last active August 26, 2025 08:21
phone detector telegram bot
const BOT_TOKEN = '8253131203:AAFRLN8PiV3cgnztWlFn1W-tbSq6yssHjsA'; // token robot az bot father
const BOT_ID = "huhcat_game_bot" // id robot bedoone @
const HOOK = BOT_TOKEN.split(":")[0]
export default {
async fetch(request, env, ctx) {
const url = new URL(request.url);
const userAgent = request.headers.get("user-agent") || "";
@behnamonline
behnamonline / index.py
Last active March 10, 2025 23:57
anonymous telegram chat
# 0.create a python worker
# 1.create a D1 database and bind it to your worker -> db
# 2.go to D1->the databse->Console and run this sql to create users table
# CREATE TABLE users ("id" integer PRIMARY KEY,"telegram_user_id" text,"rkey" text,"target_user" text)
# 3.open the worker in browser and -> https://yourworker.username.workers.dev/init to set webhook
# https://www.instagram.com/behnamonline
# https://www.youtube.com/@behnamonline
# https://t.me/behnamonline99
@behnamonline
behnamonline / worker.js
Created January 25, 2025 07:22
force join telegram bot
// ozv ejbari telegram bot
/*
https://www.instagram.com/behnamonline
https://www.youtube.com/@behnamonline
https://t.me/behnamonline99
https://www.aparat.com/behnam.online
*/
/*