roast

package
v2.49.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &commands.YAGCommand{
	CmdCategory: commands.CategoryFun,
	Name:        "Roast",
	Aliases:     []string{"insult"},
	Description: "Sends a random roast",
	Arguments: []*dcmd.ArgDef{
		{Name: "Target", Type: dcmd.User},
	},
	DefaultEnabled:      true,
	SlashCommandEnabled: true,
	RunFunc: func(data *dcmd.Data) (interface{}, error) {
		roast := html.UnescapeString(randomRoast())
		embed := &discordgo.MessageEmbed{
			Title:  data.Author.Username + " roasted ",
			Footer: &discordgo.MessageEmbedFooter{Text: "Boom, roasted!"},
		}
		if arg0 := data.Args[0].Value; arg0 != nil {
			target := arg0.(*discordgo.User)
			embed.Title += target.Username
			embed.Description = fmt.Sprintf(`## Hey %s, %s`, target.Mention(), roast)
		} else {
			embed.Title += "a random person nearby"
			embed.Description = "## " + roast
		}

		return embed, nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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