|
@@ -37,7 +37,7 @@ lazy_static! {
|
|
}
|
|
}
|
|
|
|
|
|
async fn get_audio_state(ctx: &Context, msg: &Message) -> Option<Arc<Mutex<AudioState>>> {
|
|
async fn get_audio_state(ctx: &Context, msg: &Message) -> Option<Arc<Mutex<AudioState>>> {
|
|
- let guild = msg.guild(&ctx.cache).await.unwrap();
|
|
|
|
|
|
+ let guild = msg.guild(&ctx.cache).unwrap();
|
|
let guild_id = guild.id;
|
|
let guild_id = guild.id;
|
|
|
|
|
|
let mut audio_states = AUDIO_STATES.lock().await;
|
|
let mut audio_states = AUDIO_STATES.lock().await;
|
|
@@ -88,7 +88,7 @@ async fn get_audio_state(ctx: &Context, msg: &Message) -> Option<Arc<Mutex<Audio
|
|
let mut call = call_lock.lock().await;
|
|
let mut call = call_lock.lock().await;
|
|
|
|
|
|
if call.current_channel() != Some(channel_id.into()) {
|
|
if call.current_channel() != Some(channel_id.into()) {
|
|
- if let Err(err) = call.join(channel_id.into()).await {
|
|
|
|
|
|
+ if let Err(err) = call.join(channel_id).await {
|
|
println!("Error joining call: {:?}", err);
|
|
println!("Error joining call: {:?}", err);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -108,7 +108,7 @@ async fn get_audio_state(ctx: &Context, msg: &Message) -> Option<Arc<Mutex<Audio
|
|
}
|
|
}
|
|
|
|
|
|
async fn remove_audio_state(ctx: &Context, msg: &Message) -> Result<(), String> {
|
|
async fn remove_audio_state(ctx: &Context, msg: &Message) -> Result<(), String> {
|
|
- let guild = msg.guild(&ctx.cache).await.unwrap();
|
|
|
|
|
|
+ let guild = msg.guild(&ctx.cache).unwrap();
|
|
let guild_id = guild.id;
|
|
let guild_id = guild.id;
|
|
|
|
|
|
let mut audio_states = AUDIO_STATES.lock().await;
|
|
let mut audio_states = AUDIO_STATES.lock().await;
|