This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
export const sendMessage = async ( | |
botToken: string, | |
chatId: number, | |
text: string | |
): Promise<boolean> => { | |
try { | |
const response = await axios.post(`https://api.telegram.org/bot${botToken}/sendMessage`, { | |
chat_id: chatId, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require("crypto"); | |
/* | |
t = { | |
phone: "+998 (99) 345-12-12", | |
application: "128222" | |
} | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const client_id = "YOUR_CLIENT_ID" | |
const client_secret = "YOUR_CLIENT_SECRET" | |
const refresh_token = "YOUR_REFRESH_TOKEN" | |
const basic = Buffer.from(`${client_id}:${client_secret}`).toString('base64') | |
const TOKEN_ENDPOINT = `https://accounts.spotify.com/api/token` | |
const getAccessToken = async () => { | |
const response = await fetch(TOKEN_ENDPOINT, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @BotFather orqali inline mode va inline feedback featurelari yoqilishi shart. | |
const TOKEN = ""; | |
const { Telegraf, Markup } = require('telegraf'); | |
const bot = new Telegraf(TOKEN); | |
let links = [ |