modules

package
v0.0.0-...-07de05f Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CallBotPlugin

func CallBotPlugin(command string, content string, msg *discordgo.Message)

command - The command that triggered this execution content - The content without command msg - The message object session - The discord session

func CallExtendedPlugin

func CallExtendedPlugin(content string, msg *discordgo.Message)

func CallExtendedPluginOnGuildBanAdd

func CallExtendedPluginOnGuildBanAdd(user *discordgo.GuildBanAdd)

func CallExtendedPluginOnGuildBanRemove

func CallExtendedPluginOnGuildBanRemove(user *discordgo.GuildBanRemove)

func CallExtendedPluginOnGuildMemberAdd

func CallExtendedPluginOnGuildMemberAdd(member *discordgo.Member)

func CallExtendedPluginOnGuildMemberRemove

func CallExtendedPluginOnGuildMemberRemove(member *discordgo.Member)

func CallExtendedPluginOnMessageDelete

func CallExtendedPluginOnMessageDelete(message *discordgo.MessageDelete)

func CallExtendedPluginOnReactionAdd

func CallExtendedPluginOnReactionAdd(reaction *discordgo.MessageReactionAdd)

func CallExtendedPluginOnReactionRemove

func CallExtendedPluginOnReactionRemove(reaction *discordgo.MessageReactionRemove)

func Init

func Init(session *shardmanager.Manager)

Init warms the caches and initializes the plugins

func Uninit

func Uninit(session *shardmanager.Manager)

Uninit deintializes the plugins

Types

type BaseModule

type BaseModule interface{}

type ExtendedPlugin

type ExtendedPlugin interface {
	BaseModule

	Commands() []string

	Init(session *shardmanager.Manager)

	Uninit(session *shardmanager.Manager)

	Action(
		command string,
		content string,
		msg *discordgo.Message,
		session *discordgo.Session,
	)

	OnMessage(
		content string,
		msg *discordgo.Message,
		session *discordgo.Session,
	)

	OnMessageDelete(
		msg *discordgo.MessageDelete,
		session *discordgo.Session,
	)

	OnGuildMemberAdd(
		member *discordgo.Member,
		session *discordgo.Session,
	)

	OnGuildMemberRemove(
		member *discordgo.Member,
		session *discordgo.Session,
	)

	OnReactionAdd(
		reaction *discordgo.MessageReactionAdd,
		session *discordgo.Session,
	)

	OnReactionRemove(
		reaction *discordgo.MessageReactionRemove,
		session *discordgo.Session,
	)

	OnGuildBanAdd(
		user *discordgo.GuildBanAdd,
		session *discordgo.Session,
	)

	OnGuildBanRemove(
		user *discordgo.GuildBanRemove,
		session *discordgo.Session,
	)
}

type Plugin

type Plugin interface {
	BaseModule

	Commands() []string

	Init(session *shardmanager.Manager)

	Action(
		command string,
		content string,
		msg *discordgo.Message,
		session *discordgo.Session,
	)
}

Directories

Path Synopsis
mod

Jump to

Keyboard shortcuts

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