remove space before comma
This commit is contained in:
parent
738c4efa3b
commit
153b1150a6
4
bot.rb
4
bot.rb
@ -60,11 +60,11 @@ bot.reaction_remove do |event|
|
|||||||
end
|
end
|
||||||
|
|
||||||
bot.message(in: Integer(ENV['SENTENCE_CHANNEL'])) do |event|
|
bot.message(in: Integer(ENV['SENTENCE_CHANNEL'])) do |event|
|
||||||
if ['?', '!', '.', '...'].include? event.message.content
|
if ['?', '!', '.', '...', '?!'].include? event.message.content
|
||||||
if $sentence.empty?
|
if $sentence.empty?
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
event << "Congratulations, your sentence is: #{$sentence.values.join(" ").gsub(/\s,/, ",")}#{event.message.content}"
|
event << "Congratulations, your sentence is: #{$sentence.values.join(" ").gsub(/\s([^\w\s])/, '\\\0')}#{event.message.content}"
|
||||||
$sentence.clear
|
$sentence.clear
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user