Documentation ¶
Index ¶
- Variables
- func AnyTwo(o []interface{}, f func(interface{}, interface{}) bool) bool
- func ChunkedMessageSend(s *discordgo.Session, message string)
- func CompareOp(cmp int, op string) bool
- func Critical(err error, message string)
- func DeleteEmptyStrings(s []string) []string
- func DirExists(filename string) bool
- func DownloadProgressUpdater(s *discordgo.Session, p *ProgressUpdate)
- func Exit(ExitCode int)
- func FactorioVersion() (string, error)
- func FileExists(filename string) bool
- func FormatNamed(format, name, value string) string
- func FormatUsage(s string) string
- func IsUnique(s []string) bool
- func Panik(err error, message string)
- func PluralS(x int) string
- func QuoteSpace(s string) string
- func QuoteSplit(s string, quote string) ([]string, bool)
- func SendTo(s *discordgo.Session, message string, channelID string)
- func SetTyping(s *discordgo.Session)
- func SplitAfter(s, sub string) (string, string)
- func SplitAt(s string, index int) (string, string)
- func SplitBefore(s, sub string) (string, string)
- func SplitDivide(s, sub string) (string, string)
- func Unique(strs []string) []string
- func UniqueFunc(objs []interface{}, f func(interface{}, interface{}) bool) []interface{}
- type CommandDoc
- type FactorioLogWatcher
- type MessageControlT
- func MessageControl(m *discordgo.Message) *MessageControlT
- func Send(s *discordgo.Session, message string) *MessageControlT
- func SendComplex(s *discordgo.Session, message *discordgo.MessageSend) *MessageControlT
- func SendEmbed(s *discordgo.Session, embed *discordgo.MessageEmbed) *MessageControlT
- func SendFormat(s *discordgo.Session, message string) *MessageControlT
- func SendMessage(s *discordgo.Session, message string) *MessageControlT
- func SendOptional(s *discordgo.Session, message string) *MessageControlT
- type ProgressUpdate
- type SemanticVersionT
- type TextListT
- func (l *TextListT) AddToLast(s string)
- func (l *TextListT) Append(s string)
- func (l *TextListT) FormatHeaderWithLength()
- func (l *TextListT) IsEmpty() bool
- func (l *TextListT) Len() int
- func (l *TextListT) NotEmpty() bool
- func (l *TextListT) Render() string
- func (l *TextListT) RenderNotEmpty() string
- func (l *TextListT) RenderWithoutHeading() string
- type WriteCounter
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 FactoCordVersion string
View Source
var Factorio factorioState
View Source
var GuildID string
View Source
var ModFileRegexp = regexp.MustCompile(`([A-Za-z0-9_\- ]+)_(\d+\.\d+\.\d+)(\.zip)?`)
View Source
var MyLastMessage bool
Functions ¶
func ChunkedMessageSend ¶
func DeleteEmptyStrings ¶
func DownloadProgressUpdater ¶
func DownloadProgressUpdater(s *discordgo.Session, p *ProgressUpdate)
func FactorioVersion ¶
func FileExists ¶
FileExists checks if a file exists and is not a directory
func FormatNamed ¶
func FormatUsage ¶
func QuoteSpace ¶
func SplitAfter ¶
func SplitBefore ¶
func SplitDivide ¶
func UniqueFunc ¶
func UniqueFunc(objs []interface{}, f func(interface{}, interface{}) bool) []interface{}
Types ¶
type CommandDoc ¶
type CommandDoc struct { Name string Usage string Doc string Subcommands []CommandDoc }
type FactorioLogWatcher ¶
type FactorioLogWatcher struct { ProcessFunc func(string) // contains filtered or unexported fields }
func (*FactorioLogWatcher) Flush ¶
func (t *FactorioLogWatcher) Flush()
type MessageControlT ¶
var LastMessage *MessageControlT
func MessageControl ¶
func MessageControl(m *discordgo.Message) *MessageControlT
func SendComplex ¶
func SendComplex(s *discordgo.Session, message *discordgo.MessageSend) *MessageControlT
func SendEmbed ¶
func SendEmbed(s *discordgo.Session, embed *discordgo.MessageEmbed) *MessageControlT
func SendFormat ¶
func SendFormat(s *discordgo.Session, message string) *MessageControlT
func SendMessage ¶
func SendMessage(s *discordgo.Session, message string) *MessageControlT
func SendOptional ¶
func SendOptional(s *discordgo.Session, message string) *MessageControlT
func (*MessageControlT) Delete ¶
func (m *MessageControlT) Delete(s *discordgo.Session)
func (*MessageControlT) DeleteIfPassedLess ¶
func (m *MessageControlT) DeleteIfPassedLess(s *discordgo.Session, t time.Duration)
type ProgressUpdate ¶
type ProgressUpdate struct { *WriteCounter Message *MessageControlT Start, Progress, Finished string }
type SemanticVersionT ¶
func SemanticVersion ¶
func SemanticVersion(s string) (*SemanticVersionT, *error)
func SemanticVersionPanic ¶
func SemanticVersionPanic(s string) *SemanticVersionT
func (*SemanticVersionT) Compare ¶
func (v *SemanticVersionT) Compare(v2 *SemanticVersionT) int
func (*SemanticVersionT) Equal ¶
func (v *SemanticVersionT) Equal(v2 *SemanticVersionT) bool
func (*SemanticVersionT) NewerThan ¶
func (v *SemanticVersionT) NewerThan(v2 *SemanticVersionT) bool
type TextListT ¶
func DefaultTextList ¶
func (*TextListT) FormatHeaderWithLength ¶
func (l *TextListT) FormatHeaderWithLength()
func (*TextListT) RenderNotEmpty ¶
func (*TextListT) RenderWithoutHeading ¶
type WriteCounter ¶
func (*WriteCounter) Percent ¶
func (wc *WriteCounter) Percent() float32
Source Files ¶
Click to show internal directories.
Click to hide internal directories.