class BBS::DiscordWebhook

Posts messages to a Discord channel through its webhook URL. Plain Ruby with no other part of the gem, so a board’s domain can use it without the telnet server:

require 'bbs/discord_webhook'

discord = BBS::DiscordWebhook.new(ENV['DISCORD_WEBHOOK'], label: 'feedia: Discord')
discord.post("📨 **#{BBS::DiscordWebhook.escape(name)}** wrote to the admins")

A post goes out in a thread of its own, so a slow webhook never stalls a call. Mentions are off (a caller cannot ping @everyone), the content is cut at max characters, and at most relay_max posts go out in relay_window seconds, however many callers post, so a crowd cannot flood the channel: the rest are dropped and logged. Errors and answers other than 2xx are logged (BBS.log, with label as the tag), never raised. Without a URL (nil or empty) it is off and posts nothing.