✨ Broadcast message code
📂 Filename:
👨💻 Code:
📂 Filename:
command/broadcast.js👨💻 Code:
export default async function admin_broadcast(flex) {
const adminId = 123456789; // your Telegram ID
if (user.id !== adminId) return;
const userIds = (await getDB("flex_users")) || [];
const results = await broadcast(
Object.values(userIds),
"📢 <b>Important Update!</b>\n\nCheck out the latest features!",
[{ text: "Learn More", url: "https://example.com" }],
100, // 100ms delay between messages
);
sendMessage(
`Broadcast done!\n✅ Sent: ${results.sent}\n❌ Failed: ${results.failed}`,
);
}⚠️ Note: Add your userid in adminId and your users userid inawait getDB("flex_users")usingawait setDB("flex_users", [<userid>, <userid>])for example [123456789, 987654321]
❤1👍1🐳1
⚠️ Tech News Flash: Railway paused customer deployments following a security incident where an attacker may have accessed and decrypted stored environment variables (API keys, database credentials, secrets).
📌 Key Details:
• Status: Deployments were paused. Pro/Enterprise tiers are restoring in stages, while Free/Hobby tiers remain restricted.
• Running Services: Existing apps and databases remain online; only new or updated deployments are blocked/queued.
• GitHub Pushes: Commits pushed during the pause are not auto-queued. Re-trigger manually (railway up, railway redeploy, or "Deploy Latest Commit") once builds resume for your workspace.
📌 Key Details:
• Status: Deployments were paused. Pro/Enterprise tiers are restoring in stages, while Free/Hobby tiers remain restricted.
• Running Services: Existing apps and databases remain online; only new or updated deployments are blocked/queued.
• GitHub Pushes: Commits pushed during the pause are not auto-queued. Re-trigger manually (railway up, railway redeploy, or "Deploy Latest Commit") once builds resume for your workspace.
❤2🏆1
New Video Uploaded 👇
https://youtu.be/gfAvL0nQ3oE
📹 Video Description:
In this video I have talked about how you can create and earn through refer and earn telegram bot. If you are a beginner and looking how you can create a refer and earn bot then you must watch this video. However I have provided a detailed guide with code and hosting steps in video, as well as I have told how admin and users get the benefit of this bot.
https://youtu.be/gfAvL0nQ3oE
📹 Video Description:
In this video I have talked about how you can create and earn through refer and earn telegram bot. If you are a beginner and looking how you can create a refer and earn bot then you must watch this video. However I have provided a detailed guide with code and hosting steps in video, as well as I have told how admin and users get the benefit of this bot.
⚠️ Note: Subscribe Backup Channel: https://youtube.com/@flecdev
🕊2❤1
🧑💻 Command:
Code:
/start
Code:
export default async function start(flex) {
//add your code here
sendMessage(
`<b>👋 Hello ${user.first_name},</b> Share your message which would be share to mine admin.\n\n<a href='https://telegram.dog/Flex_Coder'><b>This bot is created by Flex Coder</b></a>`,
{
reply_to_message_id: message_id,
disable_web_page_preview: true,
},
);
}👍2❤1
🧑💻 Command:
Code:
/flexreply
Code:
export const commandName = "__message__";
const esc = (s) =>
String(s ?? "")
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
export default async function flexReply(flex) {
const adminId = Number(process.env.ADMIN_ID);
const msg = flex.request.body.message;
if (!msg || flex.isCallback || flex.isInlineQuery) return;
if (flex.chat.chat_type !== "private") return;
if (flex.user.id !== adminId) {
try {
const fwd = await API.forwardMessage({
chat_id: adminId,
from_chat_id: flex.chat.id,
message_id: flex.message_id,
});
const canReplyDirectly =
fwd?.forward_origin?.sender_user?.id ?? fwd?.forward_from?.id;
if (!canReplyDirectly) {
const name =
fwd?.forward_origin?.sender_user_name ?? fwd?.forward_sender_name;
await API.sendMessage({
chat_id: adminId,
parse_mode: "HTML",
reply_parameters: { message_id: fwd.message_id },
text: `<b>👤 ${esc(name)}</b>\n🆔 ID: <code>${flex.user.id}</code>\n\n<i>Reply to this message to answer the user</i>`,
});
}
} catch (err) {
console.log(`[relay] forward failed: ${err.message}`);
}
return;
}
const replied = msg.reply_to_message;
if (!replied) return;
let targetId =
replied.forward_origin?.sender_user?.id ?? replied.forward_from?.id;
if (!targetId && replied.from?.is_bot) {
const match = (replied.text ?? "").match(/ID:\s*(\d+)/);
if (match) targetId = Number(match[1]);
}
if (!targetId) {
const hidden =
replied.forward_origin?.type === "hidden_user" ||
replied.forward_sender_name;
if (hidden) {
return sendMessage(
"<b>⚠️ This user hides forwarding. Reply to the <b>ID message</b> which is below the forwarded message.</b>",
);
}
return;
}
try {
await API.copyMessage({
chat_id: targetId,
from_chat_id: flex.chat.id,
message_id: flex.message_id,
});
} catch (err) {
console.log(`[relay] copy failed: ${err.message}`);
await sendMessage("<b>❌ Could not deliver the reply to the user.</b>");
}
}
❤1👍1🎉1
Flex Coder
New Video Uploaded 👇 https://youtu.be/gfAvL0nQ3oE 📹 Video Description: In this video I have talked about how you can create and earn through refer and earn telegram bot. If you are a beginner and looking how you can create a refer and earn bot then you must…
Watch this video and leave like, comments on this video 😉
❤1🙏1
⭐ Get Your Social Presence Moving, Starting Free!
Ready to stand out online? Flex Provider brings you a FREE Demo SMM Panel, so you can experience real growth before you commit to anything.
➡️ Claim your FREE demo today: @FlexProviderBot
Ready to stand out online? Flex Provider brings you a FREE Demo SMM Panel, so you can experience real growth before you commit to anything.
What you get 🛫:
✅ Try our SMM services at zero cost
✅ Fast, smooth, and reliable delivery
✅ Easy-to-use and built for creators
✅ Premium paid services available when you’re ready to scale
➡️ Claim your FREE demo today: @FlexProviderBot
❤2👍2
Flex Coder
⭐ Get Your Social Presence Moving, Starting Free! Ready to stand out online? Flex Provider brings you a FREE Demo SMM Panel, so you can experience real growth before you commit to anything. What you get 🛫: ✅ Try our SMM services at zero cost ✅ Fast, smooth…
Who have tried this bot 🤔?
Comment down 👇
👍2❤1
This media is not supported in your browser
VIEW IN TELEGRAM
Watch full short video 👇
https://youtube.com/shorts/HrcbCmTx15E
https://youtube.com/shorts/HrcbCmTx15E
👍1🐳1
Flex Coder
New Video Uploaded 👇 https://youtu.be/mVgFGicCmok
Make sure to leave a like and comment on this video 😊
🐳2❤1👍1
📌 Developing telegram bots.
Want your own telegram bot but don't know anything about coding? Don't worry, i got you! ✌️
Contact @Flex_Hide with your project to know pricing. 📞
Want your own telegram bot but don't know anything about coding? Don't worry, i got you! ✌️
• Effective and efficient results.⚡️
• Full assistance. 🤝
• Affordable pricing. 💸
• Life long free error fixing if any occurred. 🛡
Contact @Flex_Hide with your project to know pricing. 📞
❤🔥1👍1
🚀 FlexGram is now available on Cloudflare!
The file-based Telegram bot framework (FlexGram) now runs on Cloudflare Workers, with a new deployment system that does the setup for you.
TRY IT 👇
👉 https://github.com/NotFlexCoder/FlexGram/tree/cloudflare
The file-based Telegram bot framework (FlexGram) now runs on Cloudflare Workers, with a new deployment system that does the setup for you.
What's new?
● Deploy any bot with one command:npm run deploy
● Run multiple bots from one codebase, each with its own Worker, secrets and GitHub repo
●npm run devopens a tunnel and sets your webhook automatically
●npm run updateredeploys after you change code, and the URL stays the same
● Pick your GitHub account and your code is pushed before every deploy
TRY IT 👇
git clone -b cloudflare --single-branch https://github.com/NotFlexCoder/FlexGram.git
👉 https://github.com/NotFlexCoder/FlexGram/tree/cloudflare
❤1👍1😁1