Socket
Socket
Sign inDemoInstall

zombiezen.com/go/discord

Package Overview
Dependencies
7
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    zombiezen.com/go/discord

Package discord provides a Discord API client. A simple program that sends "Hello, World!" to a user.


Version published

Readme

Source

zombiezen Go Client for Discord

zombiezen.com/go/discord is a WIP Go library for interacting with the Discord API. It differs from DiscordGo by providing a Context-aware API.

Installation

go get zombiezen.com/go/discord

Basic Usage

auth := discord.BotAuthorization("xyzzy")
client := discord.NewClient(auth, nil)
dmChannel, err := client.CreateDM(ctx, userID)
if err != nil {
  return err
}
_, err = client.CreateMessage(ctx, &discord.CreateMessageParams{
  ChannelID: dmChannel.ID,
  Content:   "Hello, World!",
})
if err != nil {
  return err
}

See pkg.go.dev for more examples.

Contributing

We'd love to accept your patches and contributions to this project. See CONTRIBUTING.md for more details.

License

Apache 2.0

FAQs

Last updated on 09 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc