From b122e61b68738f6da0c7f5f66656ed4ab0d03ae7 Mon Sep 17 00:00:00 2001 From: Minoru Maeda <943541+maeda-m@users.noreply.github.com> Date: Sun, 26 Feb 2023 13:49:59 +0900 Subject: [PATCH] =?UTF-8?q?Gem=E8=AA=AD=E8=BE=BC=E3=81=BF=E5=89=8D?= =?UTF-8?q?=E3=81=AE=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=82=92=E9=81=A9=E5=88=87=E3=81=AAinitializers=E3=81=AB?= =?UTF-8?q?=E7=A7=BB=E5=8B=95=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- config/boot.rb | 4 ---- config/initializers/discord.rb | 5 +++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 46b84072544..1ea5e216fe0 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/config/boot.rb b/config/boot.rb index fc86e94c09a..3cda23b4db4 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -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' diff --git a/config/initializers/discord.rb b/config/initializers/discord.rb index f6e36f99adb..e70c1c50991 100644 --- a/config/initializers/discord.rb +++ b/config/initializers/discord.rb @@ -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