aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJokler <jokler@protonmail.com>2020-10-02 15:32:04 +0200
committerJokler <jokler@protonmail.com>2020-10-02 15:32:04 +0200
commit28987135afdeb121df48b32d06fa91f941f2894a (patch)
treec7123e8367b55c67f716aecd02397b0e47e551ee /src
parente44a251fe0e1b82c859515768e483f19b1b5aaf3 (diff)
downloadpokebot-28987135afdeb121df48b32d06fa91f941f2894a.tar.gz
pokebot-28987135afdeb121df48b32d06fa91f941f2894a.zip
Update dependencies
Diffstat (limited to 'src')
-rw-r--r--src/bot/master.rs4
-rw-r--r--src/bot/music.rs4
-rw-r--r--src/teamspeak/mod.rs5
3 files changed, 6 insertions, 7 deletions
diff --git a/src/bot/master.rs b/src/bot/master.rs
index fe3c3fe..1821ac1 100644
--- a/src/bot/master.rs
+++ b/src/bot/master.rs
@@ -6,7 +6,7 @@ use log::info;
use rand::{rngs::SmallRng, seq::SliceRandom, SeedableRng};
use serde::{Deserialize, Serialize};
use tokio::sync::mpsc::UnboundedSender;
-use tsclientlib::{ClientId, ConnectOptions, Identity, MessageTarget};
+use tsclientlib::{ClientId, Connection, Identity, MessageTarget};
use crate::audio_player::AudioPlayerError;
use crate::teamspeak::TeamSpeakConnection;
@@ -35,7 +35,7 @@ impl MasterBot {
let tx = Arc::new(RwLock::new(tx));
info!("Starting in TeamSpeak mode");
- let mut con_config = ConnectOptions::new(args.address.clone())
+ let mut con_config = Connection::build(args.address.clone())
.version(tsclientlib::Version::Linux_3_3_2)
.name(args.master_name.clone())
.identity(args.id.expect("identity should exist"))
diff --git a/src/bot/music.rs b/src/bot/music.rs
index 656a169..e8ed33a 100644
--- a/src/bot/music.rs
+++ b/src/bot/music.rs
@@ -8,7 +8,7 @@ use log::{debug, info};
use serde::Serialize;
use structopt::StructOpt;
use tokio::sync::mpsc::UnboundedSender;
-use tsclientlib::{data, ChannelId, ClientId, ConnectOptions, Identity, Invoker, MessageTarget};
+use tsclientlib::{data, ChannelId, ClientId, Connection, Identity, Invoker, MessageTarget};
use crate::audio_player::{AudioPlayer, AudioPlayerError, PollResult};
use crate::command::Command;
@@ -94,7 +94,7 @@ impl MusicBot {
} else {
info!("Starting in TeamSpeak mode");
- let con_config = ConnectOptions::new(args.address)
+ let con_config = Connection::build(args.address)
.version(tsclientlib::Version::Linux_3_3_2)
.name(format!("🎵 {}", args.name))
.identity(args.id)
diff --git a/src/teamspeak/mod.rs b/src/teamspeak/mod.rs
index 59a9d57..4d7c840 100644
--- a/src/teamspeak/mod.rs
+++ b/src/teamspeak/mod.rs
@@ -7,8 +7,7 @@ use tsclientlib::data::exts::{M2BClientEditExt, M2BClientUpdateExt};
use tsclientlib::{
events::Event,
sync::{SyncConnection, SyncConnectionHandle, SyncStreamItem},
- ChannelId, ClientId, ConnectOptions, Connection, DisconnectOptions, MessageTarget,
- OutCommandExt, Reason,
+ ChannelId, ClientId, ConnectOptions, DisconnectOptions, MessageTarget, OutCommandExt, Reason,
};
use log::{debug, error};
@@ -91,7 +90,7 @@ impl TeamSpeakConnection {
tx: Arc<RwLock<UnboundedSender<MusicBotMessage>>>,
options: ConnectOptions,
) -> Result<TeamSpeakConnection, tsclientlib::Error> {
- let conn = Connection::new(options)?;
+ let conn = options.connect()?;
let conn = SyncConnection::from(conn);
let mut handle = conn.get_handle();