From 172fb8b8a527984be5d84d09fd9737d0029abe92 Mon Sep 17 00:00:00 2001 From: Ladislav Hano Date: Fri, 31 Jan 2025 23:26:04 +0100 Subject: [PATCH] fix: connect error lines --- src/commands/voice/voice_utils.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/commands/voice/voice_utils.rs b/src/commands/voice/voice_utils.rs index 23d0fca..2d70342 100644 --- a/src/commands/voice/voice_utils.rs +++ b/src/commands/voice/voice_utils.rs @@ -3,11 +3,10 @@ use std::sync::Arc; use serenity::all::{ChannelId, GuildId}; use serenity::async_trait; -use serenity::model::voice; use songbird::events::{Event, EventContext, EventHandler as VoiceEventHandler}; use songbird::{Songbird, TrackEvent}; -use crate::{types::{Context, Error}, utils::utilities::get_channel_by_name}; +use crate::{types::Context, utils::utilities::get_channel_by_name}; pub const MAX_ENTRIES: &str = "15"; @@ -54,11 +53,11 @@ impl VoiceEventHandler for TrackErrorNotifier { pub async fn connect(ctx: &Context<'_>, channel: Option, events: Vec) -> Result<(Arc, GuildId), String> { if ctx.guild().is_none() { - return Err("dadsa".to_string()) + return Err("This command can be used only in guild".to_string()) } let Some(guild_id) = ctx.guild_id() else { - return Err("dadsa".to_string()) + return Err("Guild id not found".to_string()) }; let voice_channel = get_voice_channel(&ctx, channel).await?;