
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Straightforward Ruby-bindings for Discord's Web API
project -- sources -- mailing lists -- bug tracker
lib_discord
requires an installed Ruby runtime
>= 3.3
.
Install the gem and add it to your application's Gemfile:
bundle add lib_discord
If bundler is not being used to manage dependencies, install the gem with:
gem install lib_discord
Use the Client for communicating with Discord's web endpoints
require "lib_discord"
client = LibDiscord.client("Bot my.amazing.bot.token") # => LibDiscord::Client
resp = client.create_message("<channel_id>", {content: "Hi, Mom!"}) # => LibDiscord::Response
resp.success? # => true
Compare permissions:
p = LibDiscord.permissions # => Hash
my_permissions = p[:SEND_MESSAGES] + p[:ADD_REACTIONS] # => 2112
# Check for permission flags that are set.
my_permissions & p[:SEND_MESSAGES] == p[:SEND_MESSAGES] # => true
# Check for permission flags that are not set.
my_permissions & p[:KICK_MEMBERS] == p[:KICK_MEMBERS] # => false
Use maps for Discord's encoded values:
aco_types = LibDiscord.maps[:ApplicationCommand][:OptionTypes] # => Hash
aco_types[:CHANNEL] # => 7
Format Discord specific objects to render in messages:
fmt = LibDiscord.formatter
fmt.user(12345678) # => "<@12345678>"
See documentation for more details.
Please use the mailing lists if you have questions or need assistance.
Bug reports and patch submissions are welcome on SourceHut via the bug tracker and mailing lists, respectively. This project is intended to be a safe and welcoming space for collaboration. All participants are expected to adhere to the code of conduct.
See CONTRIBUTING.md for more details.
See files in the LICENSES/ directory.
FAQs
Unknown package
We found that lib_discord demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.