Add a description, image, and links to the telegram-music-bot topic page so that developers can more easily learn about it.
Curate this topic
To associate your repository with the telegram-music-bot topic, visit your repo's landing page and select "manage topics."
Learn more
Feedback
Twitter LinkedIn Facebook Email
APPLIES TO: SDK v4
You can configure your bot to communicate with people using the Telegram messaging app.
This article describes how create a Telegram bot and connect it to your bot in the Azure portal.
Tip
For information about which features are supported on each channel, see the channels reference article.
Create a Telegram bot with BotFather before connecting your bot to Telegram.
Start a new conversation with the BotFather.
Send /newbot to create a new Telegram bot.
When asked, enter a name for the bot.
Give the Telegram bot a unique username. Note that the bot name must end with the word "bot" (case-insensitive).
Copy and save the Telegram bot's access token for later steps.
Now that you have an access token, you can configure your bot in the Azure portal to communicate with Telegram.
Your bot's now successfully configured to communicate with users in Telegram.
For information about using Telegram-specific actions in messages, see how to Implement channel-specific functionality.
Submit and view feedback for
This page
View all page feedback
November 6, 2021LikbezTekhnologii
Useful tips to help turn the messenger into a convenient player.
Share
0Until recently, everything was quite simple with music in Runet. People freely uploaded and downloaded tracks, and it seemed to everyone that it was so normal. However, this has always gone against copyright law. And in the 2010s, they really began to be held accountable for its violation. They can be punished with a fine, compulsory or forced labor, and even arrest. And therefore, before uploading tracks to the Internet, including to Telegram, it is worth remembering some things.
Any song or melody has a legal copyright holder. It is there, even if you accidentally stumbled upon a fragment of a piece of music somewhere and have no idea what it is and where it comes from. And only he can freely distribute content and generally do whatever he wants with it.
By default, the exclusive right to a work, that is, the ability to use it in any form, belongs to the author.
But he can pass it on to a recording studio, a producer or someone else. And then they decide what to do with the song. Including they can forbid the author to perform his own tracks.
You can safely download music to the Internet in two cases:
Please note: sometimes artists release songs for free so that everyone can listen to them. It seems that in this case you can do anything with them. But not necessarily. Better to clarify what exactly is allowed. For example, it happens that you can download a melody, but you can’t upload it: the group wants everyone to come to their site. This information is usually available on the author's website itself.
Moreover, it is in itself a violation of the law. Without the consent of the author, you cannot change, shorten the work, add something to it.
The exclusive right to a work is valid for 70 years after the death of the author. Then the melody or song becomes public domain, that is, it can be distributed freely. But there is a nuance. The performance is also protected by copyright. For example, you can play a work by Tchaikovsky and put it on the Web. A recording of Tchaikovsky's symphony performed by the London Symphony Orchestra is not allowed.
In general, be careful not to infringe copyright. This is not only correct from the point of view of the law, but also honest in relation to the author. They usually distribute the music they like. And since you appreciated creativity, shouldn't you be grateful enough for it not to piracy?
The built-in media player allows you to listen to tracks from anywhere in Telegram, but this is rather inconvenient. There are several options for organizing music: favorites, private channel, general group.
Each of them is good in its own way.
For example, favorites are best used to store the entire database of music, channels - as an analogue of playlists by genre and mood, and general groups - as joint collections of audio for friends with similar tastes.
Here's how you can add your audio files.
Open Telegram on your computer, click on the search bar, and then on the "Favorites" icon.
Drag the desired files to the chat window.
Add a comment if you like and hit submit. Since the data is grouped into one message, this can be used, for example, to label album titles.
Please wait until the download is complete.
Create a channel, open it in the application on your computer and simply drag and drop the desired tracks into the window.
Add a comment if necessary and click the arrow button.
Once the download is complete, the files will be available for listening.
Open Telegram on your computer, click on the new message button and click "Create a group".
Select the people you want to share music with and click Next.
Click Create.
Drag audio files into the chat.
Attach a comment if you like and click the arrow button.
Wait for the download to finish and you can listen to the tracks.
To listen to music in Telegram, just open one of the audio files, wherever it is. After that, playback will start in the built-in player. Here you can switch tracks, change the playback mode, and just minimize the application, and the songs will continue to sound in the background.
Technically, Telegram cannot play audio online: when opened, the file is always loaded into the device's memory and plays from there. When the first track ends, the second track is automatically saved and starts playing, and so on.
In fact, this is the difference from offline mode.
For the above reason, you can also play tracks without the Internet, even if there is no connection to the Telegram servers. Songs must be downloaded to work offline. Otherwise, when the queue reaches a track not saved in the cache, the music will stop.
To play music offline, just listen to the song once or just click on its name in the chat. After that, the circle with an arrow next to the Play button will disappear, and the track will be available offline. By the same icon, you can understand which files are loaded and which are not.
Since the downloaded tracks take up space in the device's memory, it may run out over time. If you want to clear it, you can remove audio files from the cache.
To do this, open the Telegram settings and go to the "Data and memory" section, and then to "Memory usage".
Tap "Clear Telegram cache", check "Music" and click "Clear".
This also works the other way around. To keep the music always with you, you can uncheck it and delete other content from the cache.
Also pay attention to the file storage time setting. If the "Always" option is not set, then tracks that you have not listened to for a long time will be deleted to save space.
Once added to favorites or one of your channels, tracks are stored on Telegram servers. There they are always available for reloading, even if they are deleted from the cache. But they can also be downloaded to the device's memory, for example, to be opened in another application. Here's how to do it.
Highlight the desired song and tap "Select".
Tap the Share button and then Save to Files (iOS) or Save to Music (Android).
In desktop applications, right-click on the desired track and select "Save as .
.." on macOS or "Save audio file as ..." on Windows.
Read also 🧐
The situation with music in Telegram is very sad, everything that the messenger offers (bots and channels) is illegal.
32 454 views
And it turned out that I have a big public in VK with music and there are similar channels in Telegram, but when I publish music in VK I have no fear that my public will be blocked, in Telegram the situation is completely different, and I already lost one channel (it was blocked at the request of the copyright holders, although the content was immediately removed, and as a result, support has been silent for more than a month), and on another channel I had to leave this topic in order to save him and his audience.
Based on this situation, I have a question why the Telegram team does not legalize music/movies? Will he not create his own libraries in different languages with different availability for regions? So that, as a result, all channels publish what is legal in Telegram itself, as it is now happening in VKontakte with music.
They could easily monetize it by inserting ads and giving subscription access, a kind of Telegram + (reference to Yandex plus)
I also noticed an interesting fact (maybe just a coincidence):
- Durov resigned as CEO of VKontakte in April 2016.
– Music legalized in October 2016
And since now bots and channels with music are blocked left and right, and the channels themselves cannot be unblocked as a result, since support is silent. In this situation, I decided to take the initiative and give each Telegram user their own island with music, in the hope that they will legalize it in the future.
Create your own music bot
Since I had experience in administering my music bot in Telegram, I took into account all the factors and mistakes and decided to give the perfect music bot to every user in Telegram.
To do this, you will need to create your own bot in @BotFather (the official Telegram functionality where bots are created), after creation you will receive an API token, you will need to send this token to the @creatormusbot bot, after which you will receive the functionality of a music bot, the functionality of which we will analyze below.
In fact, without any programming, you create a bot that you will use either as your personal playlist that no one will find, or promote it, increase your audience and earn money from ads in the bot.
In the created bot, you will have 4 menu items available:
Popular - In this section, you will display songs from the VK rating, that is, everything that is now popular with users of this social network
New items - Everything is simple here, everything that the performers have released lately, everything is available with you.
VK playlist - You can say this is the treasure of this bot, with the help of this functionality, you can instantly transfer your entire playlist from your VK profile to Telegram
Why do I need this bot?
Let's take it in order:
First and probably most important, this bot is yours and only you know about it , it turns out that all other music bots and channels are public, that is, in full view of all Telegram users, namely therefore, sooner or later, such a bot will be closed by the copyright holders and you will have to look for another bot and create a new playlist there.
The second is the promotion of your channel. That is, if you run any channel in Telegram, you can advertise the channel, some posts, and so on inside your created bot.
If you have permanent listeners\users of your bot, then you can make money on it (screenshot of statistics of one of the bots). For example, sell a bot along with its audience or place advertising posts, what opportunities for advertising creatives do you have:
With all these advertising placements, you can also send the audience to some of your channel
Let's go through the results: