forked from yagich/potomark-bot-rb
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
|
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])/, '\1')}#{event.message.content}"
|
||||||
$sentence.clear
|
$sentence.clear
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user