wiscord
v1.0.7
Published
A lightweight TypeScript utility for sending Discord webhooks with clean, structured embeds. No dependencies, no nonsense. Typescript Support!
Readme
Wiscord
A lightweight TypeScript utility for sending Discord webhooks with clean, structured embeds. No dependencies, no nonsense. Typescript Support!
📦 Installation
npm install wiscordor
yarn add wiscord🚀 Usage
import { Embed, Field, sendWebhook } from "wiscord";
const embed = new Embed(
"Example Embed",
"This is a test webhook sent from my package.",
0x5865f2, // Discord blurple
[new Field("ID", "12345")]
);
await sendWebhook(embed, "https://discord.com/api/webhooks/your/webhook/url");🧱 Classes
Field
Represents a single field in the embed.
| Property | Type | Description |
| -------- | -------- | ----------- |
| name | string | Field title |
| value | string | Field value |
Embed
Represents a Discord embed object.
| Property | Type | Description |
| ------------- | --------- | -------------------------------------------------------- |
| title | string | Embed title |
| description | string | Embed description |
| color | number | Embed color (as integer or hex literal, e.g. 0x5865f2) |
| fields | Field[] | Array of embed fields |
sendWebhook(embed: Embed, url: string)
Sends the embed to a Discord webhook URL.
🧠 Notes
- Supports TypeScript out of the box.
- Converts embed objects automatically into proper Discord JSON format.
- Doesn’t depend on any Discord library — just uses
fetch.
🪪 License
MIT © Lumio
