Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Arguments = []*flags.Token{ { Name: "f", Short: "f", Optional: true, Description: "The number of decimal places to display the result.", }, { Name: "operation", Short: "o", Default: true, Description: "The operation to calculate.", }, }
View Source
var Command = &commands.WafferCommand{ Plugin: &plugins.Plugin[*discordgo.MessageCreate]{ Name: "calc", Type: plugins.MessageCreateType, Handler: Handler, }, Data: &commands.CommandData{ Name: "calc", Description: fmt.Sprintf("A mathematical calculation command. Ex: `%scalc --op (10 / 2) + 1`, `%scalc --f 4 --op (1 / 9)`. The `--f` flag sets how many decimal places to display the result. By default the command displays the first two decimal digits, but it also accepts: `0`, `1`, `2`, `3`, `4`, `5` and `6`.", env.Get("BOT_PREFIX"), env.Get("BOT_PREFIX")), Category: "util", Arguments: strings.Split(flags.GetUsages(Arguments...), "\n"), RequiredArgs: 1, Permissions: &commands.CommandPermissions{ Require: discordgo.PermissionSendMessages, AllowDM: true, }, }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.