Skip to content

Commit

Permalink
Gem読込み前の環境変数設定を適切なinitializersに移動した
Browse files Browse the repository at this point in the history
  • Loading branch information
maeda-m committed Feb 26, 2023
1 parent ca54718 commit b122e61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gem 'commonmarker'
gem 'data_migrate'
gem 'diffy'
gem 'discord-notifier'
gem 'discordrb', github: 'shardlab/discordrb'
gem 'discordrb', github: 'shardlab/discordrb', require: false
gem 'google-cloud-storage', '~> 1.25', require: false
gem 'holiday_jp'
gem 'jp_prefecture'
Expand Down
4 changes: 0 additions & 4 deletions config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@

require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.

# NOTE: ボイス機能を使用しない設定です。
# https://github.com/shardlab/discordrb/wiki/Installing-libopus
ENV['DISCORDRB_NONACL'] = 'true'
5 changes: 5 additions & 0 deletions config/initializers/discord.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# NOTE: ボイス機能を使用しない設定です。
# https://github.com/shardlab/discordrb/wiki/Installing-libopus
ENV['DISCORDRB_NONACL'] = 'true'
require 'discordrb'

Rails.application.reloader.to_prepare do
Discord::Server.configure do |config|
config.guild_id = ENV['DISCORD_GUILD_ID'].presence
Expand Down

0 comments on commit b122e61

Please sign in to comment.