diff options
| author | Jokler <jokler@protonmail.com> | 2020-10-02 16:20:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-02 16:20:05 +0200 |
| commit | d0a0c7c541d2566c6b8f6504f9453e501bc2b1d9 (patch) | |
| tree | f374da7d91b9b22f359351cc9009e3b64587bf68 /src/bot/music.rs | |
| parent | 28987135afdeb121df48b32d06fa91f941f2894a (diff) | |
| parent | 0c75c63c9aef7e885ed90f3f1a3989849af80949 (diff) | |
| download | pokebot-d0a0c7c541d2566c6b8f6504f9453e501bc2b1d9.tar.gz pokebot-d0a0c7c541d2566c6b8f6504f9453e501bc2b1d9.zip | |
Merge pull request #63 from Mavulp/channel-subscribe
Use channel specific subscribe over server wide
Diffstat (limited to 'src/bot/music.rs')
| -rw-r--r-- | src/bot/music.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/bot/music.rs b/src/bot/music.rs index e8ed33a..19b1c3f 100644 --- a/src/bot/music.rs +++ b/src/bot/music.rs @@ -295,10 +295,10 @@ impl MusicBot { } } - async fn subscribe_all(&self) { + async fn subscribe(&self, id: ChannelId) { if let Some(ts) = &self.teamspeak { let mut ts = ts.clone(); - ts.subscribe_all().await; + ts.subscribe(id).await; } } @@ -446,9 +446,8 @@ impl MusicBot { let old_channel = client.channel; self.on_client_left_channel(old_channel).await; } - MusicBotMessage::ChannelAdded(_) => { - // TODO Only subscribe to one channel - self.subscribe_all().await; + MusicBotMessage::ChannelAdded(id) => { + self.subscribe(id).await; } MusicBotMessage::StateChange(state) => { self.on_state(state).await?; |
