https://github.com/cvyl/dishook
Simple Discord Webhook Wrapper written in TypeScript
https://github.com/cvyl/dishook
discord discord-api discord-api-wrapper discord-ts discord-typescript discord-webhook discord-webhook-api discord-webhooks
Last synced: 3 months ago
JSON representation
Simple Discord Webhook Wrapper written in TypeScript
- Host: GitHub
- URL: https://github.com/cvyl/dishook
- Owner: cvyl
- License: mit
- Created: 2023-12-29T13:28:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-08T11:34:42.000Z (9 months ago)
- Last Synced: 2025-03-14T20:17:09.506Z (3 months ago)
- Topics: discord, discord-api, discord-api-wrapper, discord-ts, discord-typescript, discord-webhook, discord-webhook-api, discord-webhooks
- Language: TypeScript
- Homepage: https://lgbt.sh/dishook/
- Size: 557 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to @cvyl/dishook 👋
[](https://www.npmjs.com/package/@ly-nld/dishook)
[](https://lgbt.sh/dishook/)
[](https://github.com/ly-nld/dishook/graphs/commit-activity)
[](https://github.com/ly-nld/dishook/blob/master/LICENSE)> Simple Discord Webhook Wrapper
### 🏠 [Homepage](https://github.com/cvyl/dishook)
## Install
```sh
npm install
```## Run tests
```sh
npm run test
```Example usage
```ts
import { Embed, Webhook } from '@ly-nld/dishook'const hook = new Webhook('WEBHOOK_HERE')
const embed = new Embed()embed
.setTitle('Hello, world!')
.setDescription('This is a description')
.setURL('https://google.com')
.setColor(0x00ff00)
.setFooter({
text: 'This is a footer',
icon_url: 'https://google.com',
})
.setTimestamp()
.addField({
name: 'Field 1',
value: 'Hello, world!',
inline: true,
})hook.addEmbed(embed).send()
hook
.setTTS(true)
.setContent('Hello, world!')
.setUsername('Webhook')
.setAvatarUrl('https://google.com')
.send()
```
* Website: cvyl.me
* Github: [@cvyl](https://github.com/cvyl)
* Issues: [issues page](https://github.com/cvyl/dishook/issues).