Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AmiAmi keyword for amiami.com AmiAmi = "amiami" // CuddlyOctopus keyword for cuddlyoctopus.com CuddlyOctopus = "cuddlyoctopus" // NHentai keyword for nhentai.net NHentai = "nhentai" // SolarisJapan keyword for solarisjapan.com SolarisJapan = "SolarisJapan" // TwitterProxy keyword for twitter shortend URLs TwitterProxy = "TwitterProxy" )
View Source
const AnimeNewsChannelID = "805446666428612659"
AnimeNewsChannelID id
View Source
const AnimeOfCurrentDay = true
AnimeOfCurrentDay y or n
View Source
const HentaiNewsChannelID = "809693883809923082"
HentaiNewsChannelID id
View Source
const Prefix = "+"
Prefix for discord commands
Variables ¶
View Source
var ( // ErrURLParseFailed defines URL parse failed error. ErrURLParseFailed = errors.New("URL parse failed") // ErrCurrencyConversionFailed defines a currency conversion error. ErrCurrencyConversionFailed = errors.New("currency conversion failed") // ErrParsingMessageFailed defines a message parsing error. ErrParsingMessageFailed = errors.New("message parsing failed") )
View Source
var Commands = map[string]Command{ "help": { Description: "Shows information about all commands", SpecialPermissions: "None", }, "ping": { Description: "Send 'Pong!' back to the user", SpecialPermissions: "None", }, "animeSites": { Description: "Links the site https://piracy.moe as an anime streaming site index", SpecialPermissions: "None", }, "bestReleases": { Description: "Links the site https://releases.moe as an overview site for best anime torrents", SpecialPermissions: "None", }, "nhentai": { Description: fmt.Sprintf("%s123456 or %s12345 returns the complete link to the nhentai page", Prefix, Prefix), SpecialPermissions: "None", }, }
Commands a map that contains all commands with a description
View Source
var FakeHeaders = map[string]string{
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.8",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36",
}
FakeHeaders fake http headers
Functions ¶
This section is empty.
Types ¶
type Embeder ¶
type Embeder interface {
Embed(s *discordgo.Session, m *discordgo.MessageCreate) ([]*discordgo.MessageEmbed, error)
}
Embeder of different types of content mostly website content
type ReactionHandler ¶
type ReactionHandler interface {
Process(s *discordgo.Session, mra *discordgo.MessageReactionAdd) error
}
ReactionHandler of reactions to messages
Click to show internal directories.
Click to hide internal directories.