fluxerrb
Fluxerrb is a Ruby package (a.k.a. Gem) that allows you to make Fluxer.app bots and use Fluxer.app webhooks using the Ruby programming language. This package (a.k.a. Gem) is not officially endorsed by fluxer.app and this is not an official fluxer.app product.
You need Ruby 3.0 or newer in order to use this package (Ruby 3.2 or newer is recommended)
[!NOTE] This package (a.k.a. Gem) is in an early alpha state so expect things to be buggy and/or broken.
Setup
You can install Fluxerrb through the following methods:
Method 1: Install from Gemfile
Add the following to your Gemfile file and run the "bundle install" command:
gem 'fluxerrb'
or add the following to your Gemfile file to install with Git.
gem 'fluxerrb', git: 'https://codeberg.org/roxannewolf/fluxerrb'
Usage
You can make a simple bot like this:
require 'fluxerrb'
bot = Fluxerrb::Bot.new(token: 'YOUR_BOT_TOKEN_HERE', prefix: '!')
bot.on :message do |msg|
next if msg['author'].nil? || msg['author']['bot'] == true
puts "New Message: #{msg['content']}"
if msg['content'].downcase == 'ping'
bot.(msg['channel_id'], "Pong!")
end
end
bot.start
Webhook example:
require 'fluxerrb'
webhook = Fluxerrb::Webhook.from_url("<WEBHOOK_URL>")
webhook.("Hello World! This message was sent through a webhook using fluxerrb.")
You can view the examples directory for more examples on using this Gem
Support and Help
If you need help with this ruby package (a.k.a. Gem), feel free to join the Roxanne Studios Fluxer Server and use the Fluxerrb category to talk about this package.