support

package
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config configT

Config is a config interface.

View Source
var ConfigPath = "./config.json"
View Source
var Factorio factorioState

Functions

func ChunkedMessageSend

func ChunkedMessageSend(s *discordgo.Session, message string)

func Critical

func Critical(err error, message string)

Critical checks error != nil, logs the error and closes the app

func DeleteEmptyStrings

func DeleteEmptyStrings(s []string) []string

func DirExists

func DirExists(filename string) bool

DirExists checks if a directory exists and is not a file

func Exit

func Exit(ExitCode int)

Exit exits the application.

func FileExists

func FileExists(filename string) bool

FileExists checks if a file exists and is not a directory

func FormatUsage

func FormatUsage(s string) string

func Panik

func Panik(err error, message string)

Panik checks error != nil and logs the error without exiting the app P.S. it's a meme

func QuoteSplit

func QuoteSplit(s string, quote string) ([]string, bool)

func Send

func Send(s *discordgo.Session, message string) *discordgo.Message

func SendComplex

func SendComplex(s *discordgo.Session, message *discordgo.MessageSend) *discordgo.Message

func SendFormat

func SendFormat(s *discordgo.Session, message string) *discordgo.Message

func SendMessage

func SendMessage(s *discordgo.Session, message string) *discordgo.Message

func SendOptional

func SendOptional(s *discordgo.Session, message string) *discordgo.Message

func SplitAfter

func SplitAfter(s, sub string) (string, string)

func SplitAt

func SplitAt(s string, index int) (string, string)

func SplitBefore

func SplitBefore(s, sub string) (string, string)

func SplitDivide

func SplitDivide(s, sub string) (string, string)

Types

type FactorioLogWatcher

type FactorioLogWatcher struct {
	ProcessFunc func(string)
	// contains filtered or unexported fields
}

func (FactorioLogWatcher) Flush

func (t FactorioLogWatcher) Flush()

func (FactorioLogWatcher) Write

func (t FactorioLogWatcher) Write(p []byte) (n int, err error)

type MessageForDelete

type MessageForDelete struct {
	ID      string
	Channel string
	Time    time.Time
}

func PrepareMessageDelete

func PrepareMessageDelete(m *discordgo.Message) *MessageForDelete

func (*MessageForDelete) Delete

func (m *MessageForDelete) Delete(s *discordgo.Session)

func (*MessageForDelete) DeleteIfPassedLess

func (m *MessageForDelete) DeleteIfPassedLess(s *discordgo.Session, t time.Duration)

Jump to

Keyboard shortcuts

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