remove space before comma

This commit is contained in:
Lera Elvoé 2023-02-13 14:36:25 +03:00
parent e26d385aed
commit 738c4efa3b
Signed by: yagich
SSH Key Fingerprint: SHA256:6xjGb6uA7lAVcULa7byPEN//rQ0wPoG+UzYVMfZnbvc

2
bot.rb
View File

@ -64,7 +64,7 @@ bot.message(in: Integer(ENV['SENTENCE_CHANNEL'])) do |event|
if $sentence.empty?
next
end
event << "Congratulations, your sentence is: #{$sentence.values.join(" ")}#{event.message.content}"
event << "Congratulations, your sentence is: #{$sentence.values.join(" ").gsub(/\s,/, ",")}#{event.message.content}"
$sentence.clear
next
end