element.version === currentVersion)) { versionNodes.unshift({ version: currentVersion, url: "#" }); } document.querySelector("#project-version").innerHTML = versionNodes.reduce( (acc, element) => { const status = currentVersion === element.version ? "selected disabled" : ""; return ` ${acc} `; }, `
discord_webhook ยท v0.1.1

discord_webhook

Package Version Hex Docs License: MIT GitHub Repo

A simple Gleam library for sending Discord webhook.

discord_webhook makes it easy to send messages and embeds to Discord from Gleam projects.


Installation

Add the package:

gleam add discord_webhook

Import it:

import discord_webhook

Quick Example

import discord_webhook

pub fn main() {
  let webhook = discord_webhook.new("YOUR_WEBHOOK_URL")

  discord_webhook.send(webhook, "Hello from discord_webhook!")
}

Features

FeatureStatus
Plain text messagesโœ… Done
Embedsโœ… Done
Rich embeds๐Ÿ”จ
Name & avatar override๐Ÿ”จ
Allowed mentions๐Ÿ”จ
File attachments๐Ÿ”จ
Rate limiting๐Ÿ”จ
Detailed errors๐Ÿ“†

โœ… - Done
๐Ÿ”จ - In Progress
๐Ÿ“† - Planned
โŒ - Not Planned

Roadmap

v0.1.0

  • Basic send method
  • Basic embed support

v0.2.0

  • Username and avatar override per message
  • Permanent webhook username/avatar update
  • Per-webhook rate limiting
  • File attachments
  • Better error types (rate limits, bad requests, etc.)

v0.3.0

  • Allowed mentions
  • Allow edits after sending
  • Allow deleting messages & embeds

v1.0.0

  • Complete planned features
  • Full documentation
  • Stable API

Have a feature request or suggestion? Open an issue on GitHub.


Contributing

Contributions are welcome!

  1. Fork the repository

  2. Clone your fork:

git clone https://github.com/YOUR_USERNAME/discord_webhook.git
cd discord_webhook
  1. Install dependencies:
gleam deps download
  1. Create a branch:
git checkout -b my-feature
  1. Make your changes and add tests if needed.

  2. Run tests:

gleam test
  1. Push and open a pull request.

License

This project is licensed under the MIT License.

See the LICENSE file for details.


Links


Contact

If you have questions, suggestions, or need help:

  • Discord Username: @dj.kaif
  • Direct Profile: https://discord.com/users/1237644967422459996

Built with Gleam by DJ KAIF.

โœจ Search Document