<!DOCTYPE html>
<html>
<head>
<title>Search Music and Send to Telegram</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<script>
// Deezer API endpoint
const deezerApiUrl = 'https://api.deezer.com/search';
// Token and chat ID for Telegram
const token = 'token_bot';
const chatId = '@Html_codee';
// Function to search music and send to Telegram
function searchAndSendMusic(query) {
// Make a GET request to Deezer API
$.ajax({
url: deezerApiUrl,
method: 'GET',
data: {
q: query
},
success: function(response) {
// Get all audio results
const audioResults = response.data;
// Send each audio result to Telegram
audioResults.forEach(function(audio) {
const audioUrl = audio.preview;
// Send audio to Telegram using the Telegram Bot API
$.ajax({
url:
method: 'POST',
data: {
chat_id: chatId,
audio: audioUrl
},
success: function(response) {
console.log('Audio sent to Telegram:', audioUrl);
},
error: function(error) {
console.error('Error sending audio to Telegram:', error);
}
});
});
},
error: function(error) {
console.error('Error searching music:', error);
}
});
}
// Call the function with the desired music query
searchAndSendMusic('iu');
</script>
</body>
</html>
<html>
<head>
<title>Search Music and Send to Telegram</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<script>
// Deezer API endpoint
const deezerApiUrl = 'https://api.deezer.com/search';
// Token and chat ID for Telegram
const token = 'token_bot';
const chatId = '@Html_codee';
// Function to search music and send to Telegram
function searchAndSendMusic(query) {
// Make a GET request to Deezer API
$.ajax({
url: deezerApiUrl,
method: 'GET',
data: {
q: query
},
success: function(response) {
// Get all audio results
const audioResults = response.data;
// Send each audio result to Telegram
audioResults.forEach(function(audio) {
const audioUrl = audio.preview;
// Send audio to Telegram using the Telegram Bot API
$.ajax({
url:
https://api.telegram.org/bot${token}/sendAudio,method: 'POST',
data: {
chat_id: chatId,
audio: audioUrl
},
success: function(response) {
console.log('Audio sent to Telegram:', audioUrl);
},
error: function(error) {
console.error('Error sending audio to Telegram:', error);
}
});
});
},
error: function(error) {
console.error('Error searching music:', error);
}
});
}
// Call the function with the desired music query
searchAndSendMusic('iu');
</script>
</body>
</html>
Html codes
<!DOCTYPE html> <html> <head> <title>Search Music and Send to Telegram</title> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> </head> <body> <script> // Deezer API endpoint const deezerApiUrl = 'https://api…
This api send music with telegram bot to send music name to chat
Here are the full song results:
Another Day
Another Day
Another Day (Instrumental)
Another Day
Another Day
Another Day Instrumental
Another Day
Another Day
Another Day (Instrumental)
Another Day
Another Day
Another Day Instrumental
Here are the full song results:
Another Day
Another Day
Another Day (Instrumental)
Another Day
Another Day
Another Day Instrumental
Another Day
Another Day
Another Day (Instrumental)
Another Day
Another Day
Another Day Instrumental