Selaa lähdekoodia

fix some rejection bugs

Kylie Jo Swistak 5 vuotta sitten
vanhempi
commit
4885f522de
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      app/app_forms/image_rejection.rb
  2. 1 1
      app/embeds/reject.rb

+ 1 - 1
app/app_forms/image_rejection.rb

@@ -7,7 +7,7 @@ class ImageRejection < ApplicationForm
       app = event.message.embeds.first
       reactions = event.message.reactions
 
-      if reactions[Emoji::CHECK].count.to_i > 1
+      if reactions[Emoji::CHECK]&.count.to_i > 1
         # Find user and create embed
         user = event.server.member(UID.match(app.description)[1])
         embed = rejected_app(event, :image)

+ 1 - 1
app/embeds/reject.rb

@@ -58,7 +58,7 @@ def rejected_app(event, opts)
         join("\n") || 'No messages given'
       },{
         name: MSG,
-        value: "[Edit Your Application](#{URL::CHARACTER}" +
+        value: "[Edit Your Application](#{Url::CHARACTER}" +
         "#{app.footer.text})"
       }]
     when :image