commands

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddQuoteCommandCreate = discord.SlashCommandCreate{
	Name:        "add-quote",
	Description: "Opens the add a quote box",
	Options:     []discord.ApplicationCommandOption{},
}
View Source
var AddQuoteModalName = AddQuoteCommandCreate.Name + "-modal"
View Source
var MultiQuoteCommandCreate = discord.SlashCommandCreate{
	Name:        "multi-quote",
	Description: "Get a random quote",
	Options: []discord.ApplicationCommandOption{
		discord.ApplicationCommandOptionInt{
			Name:        "count",
			Description: "The number of quotes to return",
			Required:    true,
		},
		discord.ApplicationCommandOptionBool{
			Name:        "ephemeral",
			Description: "If the response should only be visible to you",
			Required:    false,
		},
		discord.ApplicationCommandOptionBool{
			Name:        "show-id",
			Description: "If the quote id should be shown",
			Required:    false,
		},
	},
}
View Source
var QuoteCommandCreate = discord.SlashCommandCreate{
	Name:        "quote",
	Description: "Get a random quote",
	Options: []discord.ApplicationCommandOption{
		discord.ApplicationCommandOptionBool{
			Name:        "ephemeral",
			Description: "If the response should only be visible to you",
			Required:    false,
		},
		discord.ApplicationCommandOptionBool{
			Name:        "show-id",
			Description: "If the quote id should be shown",
			Required:    false,
		},
	},
}
View Source
var RollCommandCreate = discord.SlashCommandCreate{
	Name:        "roll",
	Description: "Roll a die with a specified number of sides",
	Options: []discord.ApplicationCommandOption{
		discord.ApplicationCommandOptionInt{
			Name:        "sides",
			Description: "Number of sides on the die",
			Required:    true,
			MinValue:    intPtr(2),
		},
		discord.ApplicationCommandOptionBool{
			Name:        "ephemeral",
			Description: "If the response should only be visible to you",
			Required:    false,
		},
	},
}

Functions

func HandleAddQuoteModalSubmit

func HandleAddQuoteModalSubmit(event *events.ModalSubmitInteractionCreate, pg postgres.PostgresAccessor, config config.Config)

func RollCommand added in v0.3.0

func SendRandomMultiQuote added in v0.1.0

Types

This section is empty.

Jump to

Keyboard shortcuts

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