command

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JokeCommand = DiscordCommand{
		Command: discordgo.ApplicationCommand{
			Name:        "joke",
			Description: "Tell me some joke",
			GuildID:     os.Getenv("SERVER_GUID"),
			Type:        discordgo.ChatApplicationCommand,
			Options: []*discordgo.ApplicationCommandOption{
				getJokeCategoryOption(false),
				getJokeTypeOption(false),
			},
		},
		Execute: executeJokeCommand,
	}

	AddJokeCommand = DiscordCommand{
		Command: discordgo.ApplicationCommand{
			Name:        "add-joke",
			Description: "Add new joke to server database",
			GuildID:     os.Getenv("SERVER_GUID"),
			Type:        discordgo.ChatApplicationCommand,
			Options: []*discordgo.ApplicationCommandOption{
				getJokeCategoryOption(true),
				getJokeTypeOption(true),
				{
					Name:        "content",
					Description: "Main part of joke",
					Type:        discordgo.ApplicationCommandOptionString,
					Required:    true,
				},
				{
					Name:        "question",
					Description: "Question part in two-part joke",
					Type:        discordgo.ApplicationCommandOptionString,
					Required:    false,
				},
			},
		},
		Execute: executeAddJokeCommand,
	}
)
View Source
var SpockCommand = DiscordCommand{
	Command: discordgo.ApplicationCommand{
		Name:        "spock",
		Description: "Say funny world",
		GuildID:     os.Getenv("SERVER_GUID"),
		Type:        discordgo.ChatApplicationCommand,
		Options: []*discordgo.ApplicationCommandOption{
			{
				Required:    false,
				Type:        discordgo.ApplicationCommandOptionString,
				Name:        "id",
				Choices:     audioIdOptions(),
				Description: "Id of audio asset",
			},
		},
	},
	Execute: execSpookSpeak,
}
View Source
var SpockMusicStopCh = map[string]chan bool{}
View Source
var SpockStopCommand = DiscordCommand{
	Command: discordgo.ApplicationCommand{
		Name:        "stop",
		Description: "Stop playing song by bot",
		GuildID:     os.Getenv("SERVER_GUID"),
		Type:        discordgo.ChatApplicationCommand,
	},
	Execute: execSpookStopSpeak,
}
View Source
var WelcomeCommand = DiscordCommand{
	Command: discordgo.ApplicationCommand{
		Name:        "welcome",
		Description: "Welcome command to greetings to you",
		GuildID:     os.Getenv("SERVER_GUID"),
		Type:        discordgo.ChatApplicationCommand,
	},
	Execute: executeWelcomeCommand,
}

Functions

This section is empty.

Types

type DiscordCommand

type DiscordCommand struct {
	Command discordgo.ApplicationCommand
	Execute discordHandler
}

Jump to

Keyboard shortcuts

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