Skip to content
/ corde Public

A high level discord interactions wrapper, simple, idiomatic, testable and extensible. Based on outgoing webhooks, and designed from scratch for excellence

License

Notifications You must be signed in to change notification settings

Karitham/corde

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                        _       
                       | |      
  ___   ___   _ __   __| |  ___ 
 / __| / _ \ | '__| / _` | / _ \
| (__ | (_) || |   | (_| ||  __/
 \___| \___/ |_|    \__,_| \___|
                                

report card badge


corde is a discord webhook callback API wrapper. It aims to have an high level API to simplify the user's life as much as possible.

It contains many functions to help write as clean and concise code as possible, such as f suffixed functions which act like Sprintf.

It also has builders of some kinds, such as embed and response builders, which make error handling and responding a breeze.

All those don't hinder the fact that you can use corde with as much control as you want.

Be aware that breaking changes will happen as of now, at least until v1.

Install

go get github.com/Karitham/corde

Usage

The easiest way to run the examples, or even to run your own is to use ngrok no login or domain required, and the product itself is great.

Examples

The most basic one is bongo

Then comes todo that shows off subcommands routing and options

And then we have moderate-myself which is able to show and delete currently available commands. It demonstrates the usage of components such as buttons.

Finally, we have nft which is a simple example using user commands & message commands.

Corde is also actively used to rewrite and develop another discord bot of mine called WaifuBot (for now see the corde branch)

Why

Having used most go discord libs available, I wanted something very lightweight yet high-level, that could just run on a lambda without state, caching or long start-up times.

Corde has a single runtime dependency as of yet, a radix tree for routing purposes (and it's epic, you should check it out).

The common libs out there didn't really fit that purpose, and neither did they implement the webhook callback API available.

Corde means rope in french, because discord's API inspires exactly that /s

About

A high level discord interactions wrapper, simple, idiomatic, testable and extensible. Based on outgoing webhooks, and designed from scratch for excellence

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published