Thursday, June 04, 2026 2:32:55 AM
> project show esm_website_v1
The unexpected heart of the ESM ecosystem. What started as a simple Rails dashboard has evolved into the command center for thousands of gaming communities, proving that sometimes the best infrastructure projects are the ones you never planned to build.
Details
> discord_notifier.rb
# frozen_string_literal: true

module ExceptionNotifier
  class DiscordNotifier
    def initialize(options)
      # do something with the options...
    end

    def call(exception, options = {})
      backtrace = Rails.backtrace_cleaner.clean(exception.backtrace[0..10]).join("\n\t")
      HTTParty.post(
        Settings.discord.logging_webhook_url,
        body: {
          content: <<~STRING
            `#{Time.current}`
            **`#{exception.class}`**
            ```
            #{exception}
              #{backtrace}
            ```
            ```
            #{JSON.pretty_generate(options[:env]["exception_notifier.exception_data"])}
            ```
          STRING
        }
      )
    end
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2