remove space before all punctuation and add interrobang
This commit is contained in:
parent
738c4efa3b
commit
e56aac740b
4
bot.rb
4
bot.rb
@ -60,11 +60,11 @@ bot.reaction_remove do |event|
|
||||
end
|
||||
|
||||
bot.message(in: Integer(ENV['SENTENCE_CHANNEL'])) do |event|
|
||||
if ['?', '!', '.', '...'].include? event.message.content
|
||||
if ['?', '!', '.', '...', '?!'].include? event.message.content
|
||||
if $sentence.empty?
|
||||
next
|
||||
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])/, '\1')}#{event.message.content}"
|
||||
$sentence.clear
|
||||
next
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user