diff options
Diffstat (limited to 'crystal')
-rw-r--r-- | crystal/eventsub.cr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crystal/eventsub.cr b/crystal/eventsub.cr index 1dc8e29..48b3762 100644 --- a/crystal/eventsub.cr +++ b/crystal/eventsub.cr @@ -83,9 +83,9 @@ File.open("/tmp/eventsub.#{Process.pid}.txt", "w", 0o644 ) do |file| sub_sender = ( json["event"]["user_login"]?.as_s? || "anonymous" ) sub_recver = ( json["event"]["broadcaster_user_login"]?.as_s? || sub_sender ) sub_plan = ( json["event"]["tier"]?.as_s? || "unknown" ) - sub_total = ( json["event"]["total"]?.as_s? || "0" ) + sub_total = ( json["event"]["total"]?.as_i? || 0 ) sub_cumulative = ( json["event"]["cumulative_total"]?.as_i? || 0 ) - effectsmsg( "overlay gltext 10 " + sub_sender + " donated " + sub_total + " subs!" ) + effectsmsg( "overlay gltext 10 #{sub_sender} donated #{sub_total} subs!" ) ircmsg( settings["channel"], "#{sub_sender} has gifted #{sub_total} tier #{sub_plan} subscription for a total of #{sub_cumulative}" ) when "channel.subscription.message" sub_sender = ( json["event"]["user_login"]?.as_s? || "anonymous" ) |