quoteplugin

package
v0.0.0-...-7e69f2d Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QuotesHelp = []string{
	"quote  -- returns a random quote",
	"quote [index] -- returns a quote",
	"quote add [quote] -- adds a quote",
	"quote del [id] -- deletes a quote with the given id, e.g. 163",
	"quote list -- creates a gist with every quote",
}

Functions

This section is empty.

Types

type Quotes

type Quotes struct {
	sync.RWMutex
	Servers []*Server `json:"servers"`
}

func NewQuotePlugin

func NewQuotePlugin() *Quotes

func (*Quotes) Load

func (p *Quotes) Load() (err error)

func (*Quotes) OnMessage

func (q *Quotes) OnMessage(m *dgofw.DiscordMessage)

func (*Quotes) Save

func (q *Quotes) Save() (err error)

type Server

type Server struct {
	ID     string   `json:"id"`
	Quotes []string `json:"quotes"`
}

Jump to

Keyboard shortcuts

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