handler

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package handler combines all bot specific handlers and are the logical place to look for any handling logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentWeather added in v1.4.2

func GetCurrentWeather(o *owm.Client, loc string) (*discordgo.MessageEmbed, error)

func GetDailyDeed added in v1.4.3

func GetDailyDeed(h *http.Client, u *user.User, d *gorm.DB) (*discordgo.MessageEmbed, error)

Get the daily deed

func GetSotAchievement

func GetSotAchievement(h *http.Client, u *user.User) (*discordgo.MessageEmbed, error)

Just a test handler

func GetSotBalance

func GetSotBalance(h *http.Client, u *user.User) (*discordgo.MessageEmbed, error)

Get current SoT balance

func GetSotLedger added in v1.4.2

func GetSotLedger(h *http.Client, u *user.User, f string) (*discordgo.MessageEmbed, error)

GetSotLedger is a SoTBot handler that replies the requesting user with their current SoT ledger position in a specific faction/company

func GetSotRandomCode

func GetSotRandomCode() (*discordgo.MessageEmbed, error)

Let's the bot tell you the current date/time when requested via !time command

func GetSotReputation

func GetSotReputation(h *http.Client, u *user.User, f string) (*discordgo.MessageEmbed, error)

Just a test handler

func GetSotSeasonProgress

func GetSotSeasonProgress(h *http.Client, u *user.User) (*discordgo.MessageEmbed, error)

Just a test handler

func GetSotStats

func GetSotStats(h *http.Client, u *user.User) (*discordgo.MessageEmbed, error)

Just a test handler

func GetSotSummary added in v1.4.7

func GetSotSummary(h *http.Client, u *user.User, d *gorm.DB) (*discordgo.MessageEmbed, error)

Provide a daily summary

func GetTraderoutes added in v1.4.4

func GetTraderoutes(hc *http.Client, d *gorm.DB) (*discordgo.MessageEmbed, error)

func PlaySound

func PlaySound(v []*discordgo.VoiceState, s *discordgo.Session, ab [][]byte, u, g string) error

func RandomFact

func RandomFact(h *http.Client) (string, error)

func RegisterUser

func RegisterUser(d *gorm.DB, u string) error

Register a new user

func TMDbRandMovie added in v1.4.1

func TMDbRandMovie(t *tmdb.TMDb) (*discordgo.MessageEmbed, error)

func TMDbRandTvShow added in v1.4.6

func TMDbRandTvShow(t *tmdb.TMDb) (*discordgo.MessageEmbed, error)

func TMDbSearchMovie added in v1.4.1

func TMDbSearchMovie(t *tmdb.TMDb, q string) (*discordgo.MessageEmbed, error)

func TMDbSearchTvShow added in v1.4.6

func TMDbSearchTvShow(t *tmdb.TMDb, q string) (*discordgo.MessageEmbed, error)

func TellMemUsage

func TellMemUsage() string

Let's the bot provide some memory indicators

func TellTime

func TellTime() string

Let's the bot tell you the current date/time when requested via !time command

func TellVersion

func TellVersion() string

Let the bot tell us it's version information

func UnregisterUser

func UnregisterUser(d *gorm.DB, u string) error

Unregister a user

func Uptime added in v1.4.1

func Uptime(s time.Time) (string, error)

Let's the bot provide a help message in the DMs

func UrbanDict added in v1.4.1

func UrbanDict(h *http.Client, w string) (*discordgo.MessageEmbed, error)

func UserSetRatCookie

func UserSetRatCookie(d *gorm.DB, c *viper.Viper, u *user.User, r string) (string, error)

Set a SoT RAT cookie

Types

type SotCodeArticle

type SotCodeArticle struct {
	Number      int
	Title       string
	Description string
}

type UserRat added in v1.4.7

type UserRat struct {
	Value      string `json:"Value"`
	Expiration int64  `json:"Expiration"`
}

Jump to

Keyboard shortcuts

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