util

package
v0.0.0-...-7404a93 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsInt

func AbsInt(i int) int

AbsInt returns the absolute value of an integer

func ComesFromDM

func ComesFromDM(s *discordgo.Session, m *discordgo.MessageCreate) (bool, error)

ComesFromDM returns true if a message comes from a DM channel

func DebugError

func DebugError(err error) bool

DebugError handles an error with errlog (& zerolog)

func FileExists

func FileExists(filename string) bool

FileExists returns true if the given path exists and isn't a directory

func InitializeLogging

func InitializeLogging()

InitializeLogging inits basic logging capabilities

func MarkStartTime

func MarkStartTime()

MarkStartTime stores the start time of the bot

func RegisterTermSignals

func RegisterTermSignals()

RegisterTermSignals -

func SetupLogging

func SetupLogging()

SetupLogging sets up errlog and zerolog and sets errlog to use zerolog to

func SliceContains

func SliceContains(slice []string, str string) bool

SliceContains returns true if str is included in slice

func Uptime

func Uptime() time.Duration

Uptime returns the time since the bot started

Types

This section is empty.

Jump to

Keyboard shortcuts

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