From f46b0e4021da87aa67b374d8c5cd4a860b0b204a Mon Sep 17 00:00:00 2001 From: jude Date: Tue, 7 Jul 2020 12:53:56 +0100 Subject: [PATCH] added a message --- .idea/dataSources.local.xml | 11 +++++++++++ src/main.rs | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .idea/dataSources.local.xml diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml new file mode 100644 index 0000000..c44ff77 --- /dev/null +++ b/.idea/dataSources.local.xml @@ -0,0 +1,11 @@ + + + + + + master_key + jude + + + + \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 9ddafe2..216ec36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -174,12 +174,12 @@ SELECT COUNT(1) as count CheckResult::Success } else { - CheckResult::Failure(Reason::User("User has not got a sufficient role".to_string())) + CheckResult::Failure(Reason::User("User has not got a sufficient role. Use `?roles` to set up role restrictions".to_string())) } } Err(_) => { - CheckResult::Failure(Reason::User("User has not got a sufficient role".to_string())) + CheckResult::Failure(Reason::User("User has not got a sufficient role. Use `?roles` to set up role restrictions".to_string())) } } } @@ -522,6 +522,8 @@ async fn play(ctx: &Context, msg: &Message, args: Args) -> CommandResult { match voice_manager.join(guild_id, user_channel) { Some(handler) => { play_audio(sound, guild_data, handler, voice_guilds, pool).await?; + + msg.channel_id.say(&ctx, format!("Playing sound {} with ID {}", sound.name, sound.id)).await?; } None => {