api

package
v0.0.0-...-bf34452 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscordSession

type DiscordSession interface {
	ChannelMessageSend(channelID, content string, options ...discordgo.RequestOption) (*discordgo.Message, error)
	Channel(channelID string, options ...discordgo.RequestOption) (*discordgo.Channel, error)
	User(userID string, options ...discordgo.RequestOption) (*discordgo.User, error)
}

DiscordSession is an interface for interacting with Discord within a session message handler.

type Gist

type Gist interface {
	Upload(contents string) (string, error)
}

Gist is a wrapper around a simple Gist uploader. Returns the URL on success.

type RemoteHastebin

type RemoteHastebin struct{}

RemoteHastebin implements Gist, and interacts with the Hastebin API.

func NewRemoteHastebin

func NewRemoteHastebin() *RemoteHastebin

NewRemoteHastebin works as advertised.

func (*RemoteHastebin) Upload

func (g *RemoteHastebin) Upload(contents string) (string, error)

Upload uploads the given string to hastebin and returns the URL of the hastebin on success.

Jump to

Keyboard shortcuts

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