Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
Halo Dunia!

Bagaskara LA bagaskarala

👋
Halo Dunia!
View GitHub Profile
@bagaskarala
bagaskarala / index.js
Last active Aug 4, 2022
Telegram broadcast multiple groups using bot
View index.js
const chatIdList = ['xxx','yyy','zzz'];
const botToken = 'xxx';
const message = 'your message here';
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
(async () => {
for (let i = 0; i < chatIdList.length; i++) {
fetch(`https://api.telegram.org/bot${botToken}/sendMessage?chat_id=${chatIdList[i]}&text=${message}&parse_mode=markdown`)
.then(response => response.json())
.then(response => {
console.log({ status: `${chatIdList[i]}: ${response.ok}` });
@bagaskarala
bagaskarala / settings.json
Last active Apr 27, 2021
vue javascript vscode settings
View settings.json
// place it on your workspace .vscode folder
{
// EDITOR
// ----------------------------------------
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"[javascript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
"[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
"[vue]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" },
"[scss]": { "editor.defaultFormatter": "stylelint.vscode-stylelint" },
"[css]": { "editor.defaultFormatter": "stylelint.vscode-stylelint" },