An high level discord interactions wrapper, simple, clean, extensible. Based on outgoing webhooks.

corde

corde is a discord webhook callback API wrapper. It's nowhere near prod-ready, but it's honestly usable, and it's open to contributions.

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

Why

Having used most go discord libs available, I wanted something very lightweight, that could just run on a lambda. The common libs out there didn't really fit that purpose, and neither did they implement the webhook callback API available.

It's from that usecase that Corde is born.

Usage

See todo for an example usage.

Comments
  • Add default permissions to commands

    Add default permissions to commands

    This PR adds default permissions to application commands.

    NOTE: I've opted to go this route because *bool is awkward to work with, especially since these are usually made inline in a struct. With this implementation, users who want the (Discord) default can just not set it at all.


    It also removes SlashCommand, because it wasn't used anywhere and was a dupe of CreateCommand

  • Add some format helpers

    Add some format helpers

    This PR adds some formatting helpers from https://discord.com/developers/docs/reference#message-formatting

    I think these will be useful for responding to interactions, etc. without having to look up reference docs every time.

  • Add Route method to tree

    Add Route method to tree

    As you can see in the examples, this allows users to group common parts of a router. The indentation is nice for visual grouping, and it can help reduce re-typing the common prefix.

  • Embed builder message method

    Embed builder message method

    Adds a Message() Message method to the embed builder.

    Only exists for the sake of convenience, similarly to InteractionRespData() *InteractionRespData

  • Use InteractionRequest for incoming Interactions, attach request.Context

    Use InteractionRequest for incoming Interactions, attach request.Context

    A new type for incoming interactions, also attaches the http.Request.Context to it.

    This helps us not muddle up the Discord types for the sake of the router.

  • format accept snowflake

    format accept snowflake

    Currently most format's signatures accept strings, however, when formatting a user object for example, we are most likely to be using a snowflake.

    I think we should change those signatures.

    As an example, there is https://github.com/Karitham/corde/blob/b03180c5b02dce529e51035ea226c058f72c1b13/0_example/todo/todo.go#L58

    Which would benefit from just taking in a Snowflake.

    We could also take in any, and check for string, fmt.Stringer or use fmt.Sprint, but I'm not exactly sure how that'd end up looking

  • Builders

    Builders

    Builders are currently a mess, and you even have to call B() at the end to build the embed/response.

    We should be able to make corde's embed/responses actual builders themselves, and we wouldn't have to rely on yet another type.

  • Testing

    Testing

    Currently, there's very little tested on the main functionality.

    With #7 landing, we should be able to make basic integration tests extremely easily, and as such, try to cover more of our API

  • Add some comments

    Add some comments

    I added comments to most (if not all) exported things.

    Most of the comments are basic, but at least it will look a bit better on godoc.

    Also corrected the spelling for Attachements -> Attachments, which is breaking (but should be done sooner than later imo)

  • Add test for validation middleware

    Add test for validation middleware

    As an aside, I'm not sure I like the name Validate.

    It seems like Verify makes more sense, and even then maybe moreso in a middleware package.

    Either way, this PR adds some tests for said middleware.

  • Types & Mapping

    Types & Mapping

    We need to make sure all the API types are correctly fleshed out, with the correct struct tags & pointers, as to meet discord's API definitions.

    owmock's types are basically there, but they're not exactly implemented in the library.

    We also need to map the rest of the API, but this is a long and boring task, which can be done on the go

  • Middlewares

    Middlewares

    Middlewares are lovely.

    They're useful for all kinds of stuff, and they're especially useful when accompanied by a great routing library.

    We need to figure out a nice design to apply middlewares to Routes, Groups and Subroutes. Chi does this amazingly well

A simple Discord bot developed for the Bedrock Gophers discord server.

Bedrock Gopher A simple Discord bot developed for the Bedrock Gophers discord server. Click here to invite the bot to your guild. You will also need t

Mar 12, 2022
DiscordGo: a Go package that provides low level bindings to the Discord chat client API
DiscordGo: a Go package that provides low level bindings to the Discord chat client API

DiscordGo DiscordGo is a Go package that provides low level bindings to the Discord chat client API. DiscordGo has nearly complete support for all of

Dec 14, 2021
discord bot that plays music in a voice channel discord

Music discord bot by serje3 Description A bot written in the Golang language plays music on your server's voice channel on Discord. It can be built an

Nov 17, 2021
Discord-dl: a tool to archive discord channels

discord-dl discord-dl is a tool to archive discord channels. I think it's safe t

May 18, 2022
Discord-notif - Send notifications to discord in Your pipelines or scripts
Discord-notif - Send notifications to discord in Your pipelines or scripts

discord-notif Send notifications to discord in Your pipelines or scripts install

Dec 15, 2022
Discord-finder - The back-end for retrieving information about people on discord
Discord-finder - The back-end for retrieving information about people on discord

About This is the backend application for Discord Finder, it allows you to retrive information about people on discord just like the discord lookup we

Jan 4, 2022
Discord-bot - A Discord bot with golang

JS discord bots Install Clone repo git clone https://github.com/fu-js/discord-bo

Aug 2, 2022
Wipe-discord - TUI application to erase Discord messages
Wipe-discord - TUI application to erase Discord messages

wipe-discord Terminal user interface (TUI) application to delete Discord message

Aug 21, 2022
A modular Golang Discord API Wrapper

DisGo DisGo is a Discord API wrapper written in GoLang aimed to be consistent, modular, customizable and higher level than other Discord API wrappers.

Jan 3, 2023
Wrapper library for github.com/tucnak/telebot to create simple text-based Telegram bots

tbwrap Wrapper library for github.com/tucnak/telebot to create simple text-based Telegram bots Installation go get github.com/enrico5b1b4/tbwrap Exam

Dec 7, 2021
A Discord bot for managing ephemeral roles based upon voice channel member presence.
A Discord bot for managing ephemeral roles based upon voice channel member presence.

ephemeral-roles A Discord bot for managing ephemeral roles based upon voice channel member presence. Quickstart Click on the Ephemeral Roles logo head

Dec 19, 2022
Golang telegram bot API wrapper, session-based router and middleware

go-tgbot Pure Golang telegram bot API wrapper generated from swagger definition, session-based routing and middlewares. Usage benefits No need to lear

Nov 16, 2022
A simple Go Discord Bot for r/rareinsults
A simple Go Discord Bot for r/rareinsults

A simple Discord Bot for r/rareinsults written in Go The aim was to get posts from r/rareinsults and display them in Discord. Currently this gets the

Dec 27, 2021
Kana - Simple discord bot for generate code snippet on the fly
Kana - Simple discord bot for generate code snippet on the fly

kana discord bot for generate code snippet on the fly, made with graphene Invite

Jan 25, 2022
Buy crypto low/Sell high on Binance. Simple, powerful configuration, trade multiple assets simultaneously, single binary deployment with no external dependencies!

bnc-trading-bot Download the latest release for your OS This bot automatically trades crypto / fiat assets on Binance.com according to simple, configu

Dec 14, 2022
Bot used for https://discord.gg/rflutterdev

FlutterDoc A bot offering exactly what we need in The r/FlutterDev Discord Server that Dyno can't offer us. Quick search patterns that can be embedded

Dec 8, 2022
Harmony is a peaceful Go module for interacting with Discord's API

Harmony Harmony is a peaceful Go module for interacting with Discord's API. Although this package is usable, it still is under active development so p

Sep 18, 2022
An easy-to-use discord bot written in go

Discord Bot An easy-to-use discord bot template written in golang using discordgo. This template was written for learning golang. It will be updated a

Jan 23, 2022
discord exploit tools written in golang

The ultimate CLI tool for TiKV

Aug 19, 2021