• Stars
    star
    100
  • Rank 340,703 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple Javascript file for nicely formatting Discord webhooks

Discord Webhooks

version npm

A simple Javascript file for nicely formatting Discord webhooks

See the full documentation at jb3.github.io/webhook-discord

Usage

It's simple

To initialise:

const webhook = require("webhook-discord")

const Hook = new webhook.Webhook("WEBHOOK URL")

Presets

To send an info message:

Hook.info("WEBHOOK NAME","Info")

To send a warning message:

Hook.warn("WEBHOOK NAME", "Warning message")

To send an error message:

Hook.err("WEBHOOK NAME","Error")

To send a success message:

Hook.success("WEBHOOK NAME","Yay we did something right")

Custom messages

To send custom messages, you should make use of the MessageBuilder.

See all the options on the documentation

const webhook = require("webhook-discord");

const Hook = new webhook.Webhook("WEBHOOK URL");

const msg = new webhook.MessageBuilder()
                .setName("Username")
                .setColor("#aabbcc")
                .setText("This is my webhook!");
Hook.send(msg);

Installation

Either use npm:

npm install webhook-discord

Or clone from source:

git clone https://github.com/jb3/webhook-discord.git

License

MIT

More Repositories

1

cpu_emulator

LMC emulator written in Rust
Rust
36
star
2

language-circuitpython

A plugin for the Atom Editor to allow interfacing with CircuitPython devices.
JavaScript
17
star
3

raytracing

Raytracing with Python using Pyglet
Python
16
star
4

fizzbuzz.ko

FizzBuzz as a Kernel module
C
7
star
5

icecast-exporter

A Prometheus Exporter for Icecast
Go
4
star
6

dotfiles

My linux dotfiles.
Emacs Lisp
4
star
7

shrug-bot

A discord bot to superimpose your avatar onto a shrug.
Python
4
star
8

chaos_game

Implementation of the Chaos Game in Elixir.
Elixir
3
star
9

tcp_server

Basic TCP/HTTP server in Elixir
Elixir
3
star
10

rdns

Utility for working with reverse DNS
Rust
3
star
11

blog-old

TypeScript
3
star
12

meta-templates

Testing meta templates for PyDis, please disregard.
2
star
13

sef

A teeny tiny language written in Python to teach me some stuffs about AST
Python
2
star
14

concoction

Concoction is a Discord library for Elixir.
Elixir
2
star
15

infra

Ansible + Jinja files for deploying the web & DNS servers for jb3.dev
Jinja
2
star
16

discord_api

Discord CLI
Rust
2
star
17

discord-oauth2-gate

Cloudflare Worker for Discord OAuth2 Authentication
TypeScript
1
star
18

find_type

An Elixir library to find the type of an object
Elixir
1
star
19

image-man

Python
1
star
20

pwerus

A simple progamming language
Rust
1
star
21

ff_bot

A GitHub bot to fast-forward merge PRs onto the default branch.
Elixir
1
star
22

label-generator

TypeScript
1
star
23

no-python-2-docs

Remove Python 2 documentation (jankily) from Google Search results.
JavaScript
1
star
24

hubble

Command-line search tool for GitHub
Python
1
star
25

.github

1
star
26

fourier-series

Simple fourier series demo written in Rust with SDL
Rust
1
star
27

antur

Antur is a Python TUI tool for browsing and debugging sitemap data.
Python
1
star
28

jb3

Personal repo!
Erlang
1
star
29

aoc-2020

Advent of Code solutions for 2020
Rust
1
star
30

swot-backend

Swot
Python
1
star
31

microsoft-python-discord-bot

A bot for the Microsoft Python Discord community
Python
1
star
32

discord-slash-profiles

Cloudflare Worker for a Discord slash command application for short programming profiles.
TypeScript
1
star
33

ipc

IPC Server written in Elixir.
Elixir
1
star