Localization added, but not implemented yet.

This commit is contained in:
2026-01-06 17:18:29 -03:00
parent 1035b3d0ab
commit fc3c4787fe
9 changed files with 161 additions and 25 deletions

View File

@@ -15,10 +15,22 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
require 'discordrb'
require 'i18n'
require_relative 'database'
require_relative 'utils/locales_helper'
class FrugalityBot
def initialize
I18n.config.enforce_available_locales = false
locales_path = File.join(File.dirname(__dir__), 'locales')
I18n.load_path += Dir["#{locales_path}/*.yml"]
I18n.backend.load_translations
I18n.default_locale = :en
@bot = Discordrb::Bot.new(
token: ENV['BOT_TOKEN'],
intents: [:servers, :server_messages]