Categorygithub.com/c0re100/RadioBot
repositorypackage
1.0.4
Repository: https://github.com/c0re100/radiobot.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Telegram Radio Controller (For TDesktop-x64 only)

GitHub release PRs Welcome

An experimental bot for controlling your TDesktop-x64(with Radio mode) music streaming session.

TDesktop-x64 Radio mode is an experimental feature for streaming music through voice chat without audio filtering/processing.

That's mean you can stream your foobar2000/DeaDBeeF music library in TDesktop-x64.

Features

Basically, request, skip and search a song are supported now.

Commands

User&Admin:

  • /request Request a song with inline button menu.
  • /skip Start a poll to skip current song.
  • /search <name> or /nom <name> Search a song with track name or artist.
  • /queue Check song queue list.

Admin

  • /play Play a song
  • /stop Stop a song
  • /pause Pause a song
  • /random Skip to next random song
  • /reload Reload songs list and controller config

[WIP] Userbot mode

Unluckily, user radio bot IS NOT 100% implemented, I hope I will finish in someday...also help wanted!!!

If you're familiar with pion/webrtc, please feel free to contact me via TDesktop-x64 Chat :)

Quick Start

Requirements

  1. Telegram Desktop x64 with Radio mode
  2. foobar2000 or DeaDBeeF
  3. Virtual Audio (Windows: VB-Cable Linux: PulseAudio macOS: BlackHole)
  4. Beefweb

If you can't access Beefweb Web Interface with default port, please change the port through beefweb plugins settings and edit beefweb_port in config.json.

Setup

  1. Install virtual audio
  2. Reboot if needed
  3. Copy config.json.sample to config.json
  4. Edit config.json (See Configuration)
  5. Open foobar2000 or DeaDBeeF, set virtual audio as your music player output
  6. Open TDesktop-x64, set virtual audio as your microphone
  7. Add your control bot to group and join a voice chat to play your song.
  8. Done~

Building

tdlib

git clone https://github.com/c0re100/RadioBot
cd RadioBot
go build

Prebuilt

Release

Configuration

ParameterTypeDescription
api_idStringObtain API ID from my.telegram.org
api_hashStringObtain API Hash from my.telegram.org
bot_tokenStringObtain bot token from @BotFather
chat_idIntegerChat identifier, It can be empty if your group is public.
chat_usernameStringEmpty if your group is private and fill the chat_id field.
pinned_messageIntegerInfo message of current song playing
beefweb_portIntegerBeefweb Port, Default: 8880
playlist_idStringfoobar2000/DeaDBeeF playlist identifier,
Obtain ID from Beefweb API
LimitTypeDescription
chat_select_limitIntegerSelect page of rate limit for Chat, Default: 5
private_select_limitIntegerSelect page of rate limit for Private, Default: 10
row_limitIntegerNumber of rows, Default: 10
queue_limitIntegerMax queue songs, Default: 50
recent_limitIntegerMax recent songs, Default: 50
request_song_per_minuteIntegerRequest a songs per minute limit, Default: 1 minute(s)
VoteTypeDescription
enableBooleanIf true, user can start a vote to skip current song.
Default: true
vote_timeIntegerVote time, Default: 45s / Minimum: 5s
update_timeIntegerUpdate vote status each n seconds, Default: 15s / Minimum: 5s
release_timeIntegerLock the vote n seconds after vote ended, Default: 600s
percent_of_successFloat64Success percentage, Default: 40%
participants_onlyBooleanIf true, only participants which are in a voice chat can vote!
Default: true
user_must_joinBooleanIf true, Only users which are in the group can vote.
Default: false
WebTypeDescription
enableBooleanIf false, switch to Userbot mode.
If participants_only is true, please enable web server,
and fill the Radio controller url in TDesktop-x64.
Default: true, since userbot is not finished.
portIntegerServer Port, Default: 2468