handlers

package
v0.0.0-...-1120f02 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotCommand

func NotCommand(b *bot.Bot) func(*gumi.Ctx) error

NotCommand is executed on every message that isn't a command.

func OnError

func OnError(b *bot.Bot) func(*gumi.Ctx, error)

OnError creates an error response, logs them and sends the response on Discord.

func OnExecute

func OnExecute(b *bot.Bot) func(ctx *gumi.Ctx) error

OnExecute logs every executed command.

func OnGuildBanAdd

func OnGuildBanAdd(b *bot.Bot) func(*discordgo.Session, *discordgo.GuildBanAdd)

OnGuildBanAdd adds a banned server member to temporary banned users cache to prevent them from losing all their bookmarks on that server due to Discord removing all reactions of banned users.

func OnGuildCreate

func OnGuildCreate(b *bot.Bot) func(*discordgo.Session, *discordgo.GuildCreate)

OnGuildCreate loads server configuration on launch and creates new database entries when joining a new server.

func OnGuildDelete

func OnGuildDelete(b *bot.Bot) func(*discordgo.Session, *discordgo.GuildDelete)

OnGuildDelete logs guild outages and guilds that kicked the bot out.

func OnMessageRemove

func OnMessageRemove(b *bot.Bot) func(*discordgo.Session, *discordgo.MessageDelete)

func OnNSFW

func OnNSFW(b *bot.Bot) func(ctx *gumi.Ctx) error

OnNSFW creates a response for users who used a NSFW command in a SFW channel

func OnNoPerms

func OnNoPerms(b *bot.Bot) func(ctx *gumi.Ctx) error

OnNoPerms creates a response for users who used a command without required permissions.

func OnPanic

func OnPanic(b *bot.Bot) func(*gumi.Ctx, interface{})

func OnRateLimit

func OnRateLimit(b *bot.Bot) func(*gumi.Ctx) error

OnRateLimit creates a response for users who use bot's command too frequently

func OnReactionAdd

func OnReactionAdd(b *bot.Bot) func(*discordgo.Session, *discordgo.MessageReactionAdd)

func OnReactionRemove

func OnReactionRemove(b *bot.Bot) func(*discordgo.Session, *discordgo.MessageReactionRemove)

func OnReady

func OnReady(b *bot.Bot) func(*discordgo.Session, *discordgo.Ready)

OnReady logs that bot's up.

func PrefixResolver

func PrefixResolver(b *bot.Bot) func(s *discordgo.Session, m *discordgo.MessageCreate) []string

PrefixResolver returns an array of guild's prefixes and bot mentions.

func RegisterHandlers

func RegisterHandlers(b *bot.Bot)

Types

This section is empty.

Jump to

Keyboard shortcuts

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