Crate parco_discord

Crate parco_discord 

Source
Expand description

§Discord (Rust)

A small, async Rust client for the Discord API, built on top of reqwest with a type-safe builder API.

§Usage

use parco_discord::{Color, DiscordClient, Embed};

let client = reqwest::Client::new();
let client = DiscordClient::new(client);

client
    .message()
    .url("my webhook url")
    .embed(
        Embed::builder()
            .title("Hello From Rust")
            .description("My Descr")
            .color(Color::Blue)
            .field("Poll Time", "2025-01-01")
            .build(),
    )
    .build()
    .send()
    .await;

Structs§

DiscordClient
A reusable client for interacting with the Discord API.
Embed
An embeded message shown in discord

Enums§

Color
The color shown in discord
DiscordError