images

package
v0.0.0-...-9367e25 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscordFileFromImage

func DiscordFileFromImage(image Body, format string) *discordgo.File

Types

type Body

type Body []byte

type ImageDownloadResult

type ImageDownloadResult struct {
	// contains filtered or unexported fields
}

type Images

type Images struct {
	MessageID string
	Bodies    []Body
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(
	discord *discordgo.Session,
	imagesChannelID string,
	tenorAPIKey string,
) *Service

func (*Service) GetFilesToSend

func (s *Service) GetFilesToSend(words []string) []*discordgo.File

func (*Service) RandomGifURL

func (s *Service) RandomGifURL() (string, error)

type TenorResponse

type TenorResponse struct {
	Results []struct {
		ID           string `json:"id"`
		MediaFormats struct {
			Gif struct {
				URL string `json:"url"`
			} `json:"gif"`
		} `json:"media_formats"`
	} `json:"results"`
}

Jump to

Keyboard shortcuts

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