Browse Source

nsfw npcs should post to nsfw char channel

Kylie Jo Swistak 6 years ago
parent
commit
0734acca36
1 changed files with 2 additions and 1 deletions
  1. 2 1
      bot.rb

+ 2 - 1
bot.rb

@@ -990,6 +990,7 @@ bot.reaction_add do |event|
       char.id
     )if img_url
     color = CharacterController.type_color(char)
+    channel = char.rating.match(/nsfw/i) ? ENV['CHAR_NSFW_CH'] : ENV['CHAR_CH']
 
     embed = character_embed(
       char: char,
@@ -1000,7 +1001,7 @@ bot.reaction_add do |event|
 
     if embed
       bot.send_message(
-        ENV['CHAR_CH'].to_i,
+        channel.to_i,
         "Good news, #{uid}! Your character was approved",
         false,
         embed