banner
libxcnya.so

libxcnya.so

Nothing...
telegram
twitter
github
email

YukkiMusic Bot Detailed Setup Tutorial

Preface#

Can you help me write?

Important

The behavior of UserBot may be abused by Telegram officials, please consider the potential risks carefully.

Preparation#

  • Telegram Bot Token
  • Telegram API Key
  • One Telegram account
  • One server (recommended 2c2g)

Note

Please select the DC location for Player and Bot based on the location of your server, otherwise it may result in a poor experience.

  • One smart brain
  • One nimble hand

Environment Preparation#

  • Ubuntu Server 22.04
  • MongoDB 7.0
  • Python 3.9

Environment Installation#

MongoDB#

Please refer to the MongoDB official website for installation.
After installation, you need to manually start it.

systemctl start mongod
systemctl enable mongod

Python#

Please refer to the internet for instructions on installing Python 3.9 on Ubuntu 20.04. You can search on Baidu, Google, Bing, Sogou, or 360.

Get TG API Key#

As mentioned before, directly refer to the previous tutorial for instructions.

Note

If you already have the API ID and API Hash, please skip this step.

First, open the Telegram official website.
Enter the phone number associated with your Telegram account (in international format, such as +8618911451919).

1

Then enter the verification code you received to log in.

2

Then click on "API development tools".

3

Then come to this page and fill in the information as required.

4

Then we will get this string.

5

Take note of it and we will use it later.

Note

If you encounter an ERROR when clicking "Create application", it may be due to bad luck. It is recommended to try different nodes or devices. If it still doesn't work, you can beg others for help. (When I wrote this tutorial in August 2022, APIs could be easily obtained. Today, I couldn't get it even after changing two accounts wwwww)

Start Installation#

Get#

First, clone the repository.

git clone https://github.com/TeamYukki/YukkiMusicBot.git
cd YukkiMusicBot

Accounts#

Here, you need a Bot and a normal Telegram account.
Add them to the same group as the log group and set them as administrators (give them full control). Then, take note of the group ID (with a "-" sign).
In this group, turn on video chat (after turning it on, you can exit without clicking "End").

1

Get String Session#

Find @MaybexSessionBot.
After entering, click on "Pyrogram".

2

Then enter your API ID and API HASH as prompted.

3

Then enter the phone number of the prepared account.

4

Then you will receive a verification code.

5

When sending the code, leave a space before the code.

6

When you see this, it means it was successful.

7

Open the "Saved Message" of the account and take note of this string. We will use it later.

8

Configuration#

Go back to the server.

cp sample.env .env

Open .env with your favorite editor.
Then fill in the information according to my comments.

9

After filling in, save and exit.
Of course, you can also fill in the Spotify API according to this.
For more parameters, see here.

Installation#

cp .env .env.bak
./setup

12

When prompted, enter "y" and press Enter.
When you reach this step, press Ctrl + C.

13

After that, enter the following commands.

rm .env
cp .env.bak .env

Then enter ./start to start!

14

If you see this, it means it started successfully. You can use screen or similar tools to keep it running persistently.
By the way, if you encounter an error after pressing Ctrl + C to stop the Bot,

15

Delete YukkiMusicBot.session and run it again.

Go ahead and give it a try!

19

Conclusion#

In addition, here is a list of reference commands (you can set Bot Commands in BotFather).

start - Start
play - Play audio
vplay - Play video
cplay - Play in all channels
playlist - Show playlist
skip - Skip the current track
stop - Stop playing
loop - Loop (number of times)
ping - Are you alive?
speedtest - One-click show-off (only for Sudo users)
reboot - Reboot (only for Sudo users)

This concludes the tutorial. If it has been helpful to you, feel free to share it with others~

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.