examples/

directory
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: BSD-3-Clause

README

DiscordGo Examples

These examples demonstrate how to utilize DiscordGo.

Please explore the individual folders and give them a try!

Join Discord Gophers Discord chat channel for support.

Directories

Path Synopsis
This example demonstrates the fluent builders (builders.go and builders_components.go) together with the compile-time type-safe event handlers from typed.go (AddHandlerTyped / AddHandlerOnceTyped).
This example demonstrates the fluent builders (builders.go and builders_components.go) together with the compile-time type-safe event handlers from typed.go (AddHandlerTyped / AddHandlerOnceTyped).
This example demonstrates bulk banning users with GuildBulkBan.
This example demonstrates bulk banning users with GuildBulkBan.
This example synchronizes the application (slash) commands declared in this file with Discord using ApplicationCommandsSync.
This example synchronizes the application (slash) commands declared in this file with Discord using ApplicationCommandsSync.
This example runs a bot in Discord's "webhook interactions" mode: instead of keeping a gateway websocket connection open, an HTTP server receives interaction POSTs from Discord and answers them directly in the HTTP response.
This example runs a bot in Discord's "webhook interactions" mode: instead of keeping a gateway websocket connection open, an HTTP server receives interaction POSTs from Discord and answers them directly in the HTTP response.
This example demonstrates using the ShardManager to connect a bot across multiple gateway shards with shared event handlers.
This example demonstrates using the ShardManager to connect a bot across multiple gateway shards with shared event handlers.
This example demonstrates the soundboard API: listing guild sounds, uploading one, and playing it in a voice channel.
This example demonstrates the soundboard API: listing guild sounds, uploading one, and playing it in a voice channel.
This example demonstrates joining a voice channel, sending opus audio from a DCA file, and reporting voice heartbeat latency.
This example demonstrates joining a voice channel, sending opus audio from a DCA file, and reporting voice heartbeat latency.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL