Skip to content

Commit

Permalink
Fix: Fix info variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Jul 20, 2023
1 parent f07dfc4 commit 6b55e84
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions backend/config/initializers/discord.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ def method_missing(*_args)
else
$discord = DiscordRequest.new(bot_token: ENV["DISCORD_BOT_TOKEN"])

begin
info = $discord.get("/users/@me")
rescue StandardError
Rails.logger.error("Discord: Failed to log in, disabling")
$discord = Disabled.new
end
info =
begin
$discord.get("/users/@me")
rescue StandardError
Rails.logger.error("Discord: Failed to log in, disabling")
$discord = Disabled.new
end

Rails.logger.info(
"Discord: Logged in as #{info[:username]}##{info[:discriminator]}"
Expand Down

0 comments on commit 6b55e84

Please sign in to comment.