bot

package
v0.0.0-...-d6d16f5 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Commands = []*discordgo.ApplicationCommand{
		{
			Name:        "debug",
			Description: "Debugging command that returns an error",
		},
		{
			Name:        "version",
			Description: "Get the version information for this bot",
		},
		{
			Name:        "generate",
			Description: "Creates a single large image given a prompt",
			Options: []*discordgo.ApplicationCommandOption{
				{
					Name:        "image-prompt",
					Description: "Text prompt to pass to Dall-e 2",
					Type:        discordgo.ApplicationCommandOptionString,
					Required:    true,
				},
			},
		},
	}
)

Functions

This section is empty.

Types

type Bot

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

Define the structure of our Dalle bot

func New

func New(gcpProjectID, openaiApiSecret string) *Bot

func (*Bot) Debug

func (b *Bot) Debug(c *webhooks.Client, i *discordgo.Interaction, r *http.Request) error

Debug returns an error to test email notifications

func (*Bot) Generate

func (b *Bot) Generate(c *webhooks.Client, i *discordgo.Interaction, r *http.Request) error

Generate creates a single large image given a prompt

func (*Bot) Version

func (b *Bot) Version(c *webhooks.Client, i *discordgo.Interaction, r *http.Request) error

Version returns the git commit sha of the bot

Jump to

Keyboard shortcuts

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