Skip to content

Instantly share code, notes, and snippets.

View Misaka13514's full-sized avatar

欠陥電気 Misaka13514

View GitHub Profile
@Misaka13514
Misaka13514 / MisakaTweetSyncBot-data.json
Last active April 27, 2023 02:39
NeverBehave/Tweet2Telegram
{
"since_id": [
"1462379926682693632",
"1462369243735883779",
"1462357691741786113",
"1462343691754872833",
"1462298785686511616",
"1462284638857007107",
"1462255847615045636",
"1462245188558995457",
@Misaka13514
Misaka13514 / worker.js
Created June 16, 2021 14:38 — forked from moesoha/worker.js
Auto kick added member from Telegram group (deployed on CloudFlare Worker)
addEventListener('fetch', event => event.respondWith(handleRequest(event.request)));
// Add environment variable `TGBOT_TOKEN` via Worker-Settings
async function requestTelegramBotAPI(method, payload) {
return fetch(`https://api.telegram.org/bot${TGBOT_TOKEN}/${method}`, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8"
},
body: !payload ? undefined : JSON.stringify(payload)