isabellebot

package
v0.0.0-...-c0a088c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// AdminRole contains the role ID of the discord server's admin role
	AdminRole string

	// DS represents the bot's current discord session
	DS *discordgo.Session

	// Service is the gateway to all Service interactions
	Service models.Services

	// Prefix is the user set bot prefix found in .config (default is ?)
	Prefix string

	// Commands is a map of command name to a closure of the func
	Commands map[string]Command

	// ID of channel to post listings
	Listing string

	// ID of channel to accept bot commands
	BotCh string

	// Channel ID of rep applications
	App string
}

Bot represents a daisymae bot instance

func New

func New(botKey, admin, listing, botCh, app string) (*Bot, error)

New creates a new daisymae bot instance and loads bot commands.

It will return the finished bot and nil upon success or empty bot and err upon failure

func (*Bot) SetPrefix

func (b *Bot) SetPrefix(newPrefix string)

SetPrefix sets user directed bot prefix from .config

type Command

type Command struct {
	Cmd func(cmd.CommandInfo)
}

Command represents a discord bot command

Jump to

Keyboard shortcuts

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