Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HelpCommand = core.Command{ Name: "ajuda", Description: "Pagina de comandos", Handler: func(ctx *core.CommandContext) { embed := utils.NewEmbed().Color(0x7289da) for _, module := range core.Modules { if len(module.Commands) == 0 { continue } var fieldDesc string for _, cmd := range module.Commands { fieldDesc += utils.Fmt("`/%s` - %s\n", cmd.Name, cmd.Description) } embed.Field(utils.Fmt("%s %s", module.Emote, module.Name), fieldDesc, false) } ctx.Ephemeral().Reply(embed) }, }
View Source
var PingCommand = core.Command{ Name: "ping", Description: "Mostra uma média da latência do bot para os servidores do Discord", Handler: func(ctx *core.CommandContext) { latency := ctx.State.Gateway().Latency() if latency <= 0 { ctx.Reply(emojis.PingPong, "Não há medições de latência suficientes ainda ;(") return } ctx.Reply(emojis.PingPong, "Pong, %dms.", latency.Milliseconds()) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.