Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Unfancy Ruby-bindings to interact with Discord's HTTPS/REST web API.
project -- sources -- mailing lists -- bug tracker
lib_discord
requires an installed Ruby runtime
>= 3.2
.
Install the gem and add to the application's Gemfile by executing:
bundle add lib_discord
If bundler is not being used to manage dependencies, install the gem by executing:
gem install lib_discord
require "lib_discord"
client = LibDiscord::Client.new("Bot my.amazing.bot.token")
Access resource types with #[]
syntax:
client.keys
# =>
# ["application",
# "application_command",
# "application_role_connection_metadata",
# "audit_log",
# "auto_moderation",
# "channel",
# "emoji",
# "guild",
# "guild_scheduled_event",
# "guild_template",
# "interaction",
# "invite",
# "poll",
# "stage_instance",
# "sticker",
# "user",
# "voice",
# "webhook"]
client["application"]
# => #<LibDiscord::Application: ... >
Use resources to make requests to Discord's API. LibDiscord resources are mapped to the "Resources" described in Discord's developer documentation.
resp = client["guild"].get_guild_channels(guild_id: "12345678901234567890")
resp.code
# => 200
resp.headers
# => Hash of HTTP response headers
resp.body_parsed
# => JSON body deserialized to a Hash
resp.body_raw
# => raw response body in String form
Please use the mailing lists if you have questions or need help.
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, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
This project adheres to Standard Ruby style rules.
Additionally, we strive for an 80 character line length, but it's not a hard-and-fast rule. There are occasions where breaking an expression across multiple lines decreases readability for no benefit other than to appease a linter. As such, there is no tool to enforce an 80 character line length.
Everyone interacting in the lib_discord
project's codebase, bug trackers,
chat rooms, and mailing lists is expected to follow the code of conduct.
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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.