GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - wumpkit/wumpkit: A lightweight feature rich Discord library for Golang

BranchesTags
Open more actions menu

Latest commit

 

History

375 Commits
375 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
_examples
_examples
 
 
docs
docs
 
 
extra/redis
extra/redis
 
 
internal
internal
 
 
scripts
scripts
 
 
.golangci.yml
.golangci.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
application.go
application.go
 
 
application_command.go
application_command.go
 
 
application_command_rest.go
application_command_rest.go
 
 
application_rest.go
application_rest.go
 
 
attachment.go
attachment.go
 
 
audit_log.go
audit_log.go
 
 
audit_log_rest.go
audit_log_rest.go
 
 
auto_moderation.go
auto_moderation.go
 
 
auto_moderation_rest.go
auto_moderation_rest.go
 
 
bitfield.go
bitfield.go
 
 
builder.go
builder.go
 
 
builder_test.go
builder_test.go
 
 
cache.go
cache.go
 
 
cache_test.go
cache_test.go
 
 
channel.go
channel.go
 
 
channel_rest.go
channel_rest.go
 
 
channel_test.go
channel_test.go
 
 
client.go
client.go
 
 
client_cache_aside.go
client_cache_aside.go
 
 
client_cache_aside_test.go
client_cache_aside_test.go
 
 
color.go
color.go
 
 
color_test.go
color_test.go
 
 
command_builder.go
command_builder.go
 
 
command_builder_test.go
command_builder_test.go
 
 
component.go
component.go
 
 
component_test.go
component_test.go
 
 
dispatcher.go
dispatcher.go
 
 
dispatcher_test.go
dispatcher_test.go
 
 
emoji.go
emoji.go
 
 
emoji_rest.go
emoji_rest.go
 
 
entitlement.go
entitlement.go
 
 
entitlement_rest.go
entitlement_rest.go
 
 
enum_test.go
enum_test.go
 
 
event.go
event.go
 
 
event_handler.go
event_handler.go
 
 
event_test.go
event_test.go
 
 
file.go
file.go
 
 
file_test.go
file_test.go
 
 
gateway.go
gateway.go
 
 
gateway_rest.go
gateway_rest.go
 
 
gateway_test.go
gateway_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
guild.go
guild.go
 
 
guild_rest.go
guild_rest.go
 
 
guild_scheduled_event.go
guild_scheduled_event.go
 
 
guild_scheduled_event_rest.go
guild_scheduled_event_rest.go
 
 
guild_template.go
guild_template.go
 
 
guild_template_rest.go
guild_template_rest.go
 
 
image.go
image.go
 
 
interaction.go
interaction.go
 
 
interaction_response.go
interaction_response.go
 
 
interaction_response_test.go
interaction_response_test.go
 
 
interaction_rest.go
interaction_rest.go
 
 
interaction_test.go
interaction_test.go
 
 
invite.go
invite.go
 
 
invite_rest.go
invite_rest.go
 
 
locales.go
locales.go
 
 
logger.go
logger.go
 
 
markdown.go
markdown.go
 
 
markdown_test.go
markdown_test.go
 
 
member.go
member.go
 
 
message.go
message.go
 
 
message_paginator.go
message_paginator.go
 
 
message_paginator_test.go
message_paginator_test.go
 
 
message_rest.go
message_rest.go
 
 
message_test.go
message_test.go
 
 
oauth2.go
oauth2.go
 
 
oauth2_rest.go
oauth2_rest.go
 
 
oauth2_test.go
oauth2_test.go
 
 
permissions.go
permissions.go
 
 
permissions_test.go
permissions_test.go
 
 
poll.go
poll.go
 
 
poll_rest.go
poll_rest.go
 
 
presence.go
presence.go
 
 
ratelimit.go
ratelimit.go
 
 
ratelimit_test.go
ratelimit_test.go
 
 
requester.go
requester.go
 
 
requester_test.go
requester_test.go
 
 
rest_test.go
rest_test.go
 
 
role.go
role.go
 
 
shard_manager.go
shard_manager.go
 
 
shard_manager_test.go
shard_manager_test.go
 
 
snowflake.go
snowflake.go
 
 
snowflake_test.go
snowflake_test.go
 
 
soundboard.go
soundboard.go
 
 
soundboard_rest.go
soundboard_rest.go
 
 
stage_instance.go
stage_instance.go
 
 

Repository files navigation

wumpkit

Go Reference Go Report Card Test Release License

A lightweight and idiomatic Discord API wrapper for Go.


Features

  • Context-First: Built entirely around Go's standard context.Context package.
  • Pluggable Components: First-class support for swapping core components (like caching, rate limit stores, logging) with custom implementations.
  • Automatic Sharding: Full support for automatic and manual sharding in an easy way.

Installation

go get github.com/wumpkit/wumpkit

Requires Go 1.27+.


Quick Start

package main

import (
	"context"
	"fmt"
	"log/slog"
	"os"

	"github.com/wumpkit/wumpkit"
)

func main() {
	token := os.Getenv("DISCORD_TOKEN")
	if token == "" {
		slog.Error("DISCORD_TOKEN is required")
		os.Exit(1)
	}

	bot := wumpkit.New(
		context.Background(),
		wumpkit.WithToken(token),
		wumpkit.WithGatewayConfig(wumpkit.ShardManagerConfig{
			Intents: wumpkit.GatewayIntentGuilds |
				wumpkit.GatewayIntentGuildMessages |
				wumpkit.GatewayIntentMessageContent,
		}),
	)

	bot.OnReady(func(ctx context.Context, event wumpkit.ReadyEvent) {
		slog.Info("Connected", "user", event.User.Username, "guilds", len(event.Guilds))
	})

	bot.OnMessageCreate(func(ctx context.Context, event wumpkit.MessageCreateEvent) {
		if event.Message.Author.Bot || event.Message.Content != "!ping" {
			return
		}

		latency := bot.ShardManager().AverageLatency()
		_, _ = bot.CreateMessage(ctx, event.Message.ChannelID, wumpkit.CreateMessageOptions{
			Content: fmt.Sprintf("Pong! Heartbeat latency: %v", latency),
		})
	})

	if err := bot.StartGatewayWithSignals(); err != nil {
		slog.Error("bot stopped", "error", err)
	}
}

Distributed Setup (Redis)

For clustered bots sharing rate limits and cache across multiple nodes:

import (
	"github.com/wumpkit/wumpkit"
	"github.com/wumpkit/wumpkit/extra/redis"
	goredis "github.com/redis/go-redis/v9"
)

rdb := goredis.NewClient(&goredis.Options{Addr: "localhost:6379"})

bot := wumpkit.New(
	ctx,
	wumpkit.WithToken(token),
	wumpkit.WithCacheManager(redis.NewRedisCacheManager(rdb, wumpkit.CacheFlagsAll)),
	wumpkit.WithRateLimitStore(redis.NewRedisRateLimitStore(rdb)),
)

Examples

Runnable examples are in the _examples directory:

  • pingpong - Basic ping pong bot
  • slash_commands - Application slash commands
  • components - Buttons and select menus
  • jointocreate - Dynamic voice channel creator
  • sharded_bot - Multi-sharded bot setup
  • redis_cache - Distributed Redis cache and rate limiting
  • oauth2_server - Standalone OAuth2 web server

Community & Governance

  • Changelog - Release history and version notes following Keep a Changelog.
  • Contributing Guide - Development workflow, code style, and PR guidelines.
  • Security Policy - Vulnerability disclosure and reporting procedure.
  • Code of Conduct - Contributor Covenant 2.1 standards.
  • Support Guide - Getting help, reporting bugs, and asking questions.

License

BSD 3-Clause License. See LICENSE for details.

About

A lightweight feature rich Discord library for Golang

wumpkit.github.io/wumpkit/

Topics

discorddiscord-apidiscord-botdiscord-librarygowumpkitwumpus-kitwumpus-library

Resources

Readme
BSD-3-Clause license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

6 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.