/httpcord

Simply go project for discord http interactions

Primary LanguageGo

Github tag CodeFactor DeepSource made-with-Go

HttpCord Go

Simply go project for discord http interactions

Inspired by Discord Interactions, Discord.JS And DiscordGo

Getting Started

Installation

go get github.com/denkylabs/discord-api-types-go@v0.0.6

Example

package main

import "github.com/JustAWaifuHunter/httpcord"

func main() {
	connection := httpcord.NewConnection(httpcord.ConnectionOptions{
		HttpConnection: httpcord.FastHttpConnection,
		PublicKey: "Your Discord Application Public Key Here",
	})

	connection.AddInteractionHandler(func(ctx httpcord.ConnectionContext) {
		ctx.ReplyInteraction(&httpcord.InteractionCallbackData{
			Content: "Hello World",
		})
	})

	connection.Connect(":8080")
}