disc

package
v0.1.0-alpha.0...-228da3c Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(configuration *config.ConfStruct, db db.Querier) (func() error, error)

Start starts the bot, registers the command and updates its status

Types

type Bot

type Bot struct {
	Ctx *bot.Context

	Me *discord.User

	DB db.Querier
	// contains filtered or unexported fields
}

Bot represent the bot

func (*Bot) Claim

func (bot *Bot) Claim(m *gateway.MessageCreateEvent, name ...Name) (*discord.Embed, error)

Claim a waifu and adds it to the user's database

func (*Bot) Drop

func (b *Bot) Drop(m *gateway.MessageCreateEvent)

func (*Bot) Favorite

func (b *Bot) Favorite(m *gateway.MessageCreateEvent, name ...Name) (string, error)

Favorite sets a waifu as favorite

func (*Bot) Give

Give is used to give a character to a user

func (*Bot) Help

func (b *Bot) Help(_ *gateway.MessageCreateEvent) (*discord.Embed, error)

Help prints the default help message.

func (*Bot) List

List shows the user's list

func (*Bot) Profile

Profile displays user profile

func (*Bot) Quote

func (b *Bot) Quote(m *gateway.MessageCreateEvent, quote ...string) (string, error)

Quote sets a quote on the user profile

func (*Bot) Roll

func (b *Bot) Roll(m *gateway.MessageCreateEvent) (*discord.Embed, error)

Roll drops a random character and adds it to the database

func (*Bot) Verify

func (b *Bot) Verify(m *gateway.MessageCreateEvent, ID int64, _ ...*arguments.UserMention) (string, error)

Verify verify if someone has a waifu

type Dropper

type Dropper struct {
	Waifu   map[discord.ChannelID]anilist.CharStruct
	ChanInc map[discord.ChannelID]int
	Mutex   *sync.Mutex
}

Dropper is used to handle the dropping mechanism

type Name

type Name = string

Name represent the name of a character

type Search struct {
	Ctx *bot.Context
}

Search Initializes a subcommand

func (*Search) Anime

func (s *Search) Anime(_ *gateway.MessageCreateEvent, name ...Name) (string, error)

Anime is a subcommand of Search

func (*Search) Character

func (s *Search) Character(_ *gateway.MessageCreateEvent, name ...Name) (string, error)

Character is a subcommand of Search

func (*Search) Manga

func (s *Search) Manga(_ *gateway.MessageCreateEvent, name ...Name) (string, error)

Manga is a subcommand of Search

func (*Search) Setup

func (s *Search) Setup(sub *bot.Subcommand)

Setup setups the subcommand

func (*Search) User

func (s *Search) User(_ *gateway.MessageCreateEvent, name ...Name) (string, error)

User is a subcommand of Search

type Trending struct {
	Ctx *bot.Context
}

Trending Initializes a subcommand

func (*Trending) Anime

Anime is a subcommand of Search

func (*Trending) Manga

Manga is a subcommand of Search

func (*Trending) Setup

func (s *Trending) Setup(sub *bot.Subcommand)

Setup setups the subcommand

Jump to

Keyboard shortcuts

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