Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.4 KB

README.md

File metadata and controls

33 lines (26 loc) · 1.4 KB

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")
}