负责人https://t.me/lzxmnk
月影主频道是一个专注于分享关于月亮和星空的精彩内容的Telegram频道。不论你是对天文学感兴趣的爱好者,还是只是想在繁忙的生活中寻找一丝宁静和美丽,这个频道都将带给你惊喜。jkojdm作为频道创始人,热爱探索宇宙之谜,通过定期更新的图片、视频和文章,带领大家一起领略月亮和星空的神秘之美。无论是欣赏月光下的山水画面,还是了解星座背后的传说,都能在这里找到答案。加入月影主频道,让我们一起沉醉于宇宙的奇妙之中吧!
10 Jan, 17:26
10 Jan, 16:33
04 Jan, 17:16
04 Jan, 16:24
02 Jan, 15:41
02 Jan, 15:22
60DAY-PUBGM-8JO2VZ35G4
加入官方频道↓02 Jan, 13:59
30 Dec, 07:17
ON1mfS4gB7cr6LzU
27 Dec, 00:32
27 Dec, 00:32
26 Dec, 03:35
06 Dec, 03:17
06 Dec, 03:09
06 Dec, 02:47
05 Dec, 10:55
56OkNXuvPa39nSjU
29 Nov, 10:01
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
const API_TOKEN = '机器人token@botfather获取'
const channels = [-1001285658397, -1001682213840, -1001950384240, -1002196738831,-1001814462831,-1002227231255,-1001845544423]
async function userInChannels(userId, channels) {
for (let channel of channels) {
const url = `https://api.telegram.org/bot${API_TOKEN}/getChatMember?chat_id=${channel}&user_id=${userId}`
const response = await fetch(url)
const data = await response.json()
if (data.ok) {
const status = data.result.status
if (!['member', 'administrator', 'creator'].includes(status)) {
return false
}
} else {
return false
}
}
return true
}
async function handleRequest(request) {
const url = new URL(request.url)
const pathname = url.pathname
const params = new URLSearchParams(url.search)
if (pathname === '/webhook') {
const body = await request.json()
const message = body.message
const chatId = message.chat.id
const userId = message.from.id
const command = message.text.trim().toLowerCase()
if (command === "/start") {
const inChannels = await userInChannels(userId, channels)
if (inChannels) {
return sendTelegramMessage(chatId, "成功发送的消息")
} else {
return sendTelegramMessage(chatId, "失败发送的消息")
}
}
}
return new Response('OK')
}
async function sendTelegramMessage(chatId, text) {
const url = `https://api.telegram.org/bot${API_TOKEN}/sendMessage`
const body = JSON.stringify({ chat_id: chatId, text: text })
await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: body
})
return new Response('Message sent')
}
21 Nov, 18:06
21 Nov, 17:23
21 Nov, 16:04
21 Nov, 15:59
17 Nov, 02:55
31 Oct, 03:33
31 Oct, 03:19
12 Oct, 09:31
MADCF760EA5BD136394F5CAA89301F7B
】06 Oct, 16:06
MADCF760EA5BD136394F5CAA89301F7B
】06 Oct, 04:52
MADCF760EA5BD136394F5CAA89301F7B
】