Moved more messages to config

This commit is contained in:
Matthieu Grieger 2014-11-25 15:26:05 -08:00
parent 70dc361f16
commit 8feadd2bd5
2 changed files with 11 additions and 6 deletions

View file

@ -124,9 +124,10 @@ ADMIN_MUTE = true
# DEFAULT VALUE: true
ADMIN_UNMUTE = true
# ---------------------
#----------------------
# MESSAGE CONFIGURATION
# ---------------------
#----------------------
# Message shown to users when they do not have permission to execute a command.
NO_PERMISSION_MSG = "You do not have permission to execute that command."
@ -149,4 +150,8 @@ NOT_IN_VOLUME_RANGE_MSG = "The volume you tried to supply is not in the allowed
# Message shown to users when they successfully change the volume.
VOLUME_SUCCESS_MSG = "You have successfully changed the volume to the following: %s."
# Message shown to users when they try to skip a song they have already skipped.
ALREADY_SKIPPED_MSG = "You have already voted to skip this song."
# Message shown to users when the required number of votes to trigger a skip has been met.
SKIP_SUCCESS_MSG = "Number of required skip votes has been met. Skipping song!"

View file

@ -140,7 +140,7 @@ class MumbleDJ
if @song_queue.add_song?(url, sender)
@client.text_channel(@client.me.current_channel.name, "<b>#{sender}</b> has added a song to the queue.")
else
@client.text_user(sender, "The URL you provided was not valid.")
@client.text_user(sender, INVALID_URL_MSG)
end
end
@ -151,11 +151,11 @@ class MumbleDJ
if @song_queue.get_current_song.add_skip?(sender)
@client.text_channel(@client.me.current_channel.name, "<b>#{sender}</b> has voted to skip the current song.")
if @song_queue.get_current_song.skip_now?(@client.me.current_channel.users.count - 1)
@client.text_channel(@client.me.current_channel.name, "Number of required skip votes has been met. Skipping song!")
@client.text_channel(@client.me.current_channel.name, SKIP_SUCCESS_MSG)
@song_queue.get_current_song.skip
end
else
@client.text_user(sender, "You have already voted to skip this song.")
@client.text_user(sender, ALREADY_SKIPPED_MSG)
end
end
@ -167,7 +167,7 @@ class MumbleDJ
begin
@client.join_channel(channel)
rescue Mumble::ChannelNotFound
@client.text_user(sender, "The channel you provided does not exist.")
@client.text_user(sender, CHANNEL_DOES_NOT_EXIST_MSG)
end
end
end