botutils

package module
v0.0.0-...-701fc27 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 8 Imported by: 2

README

BotUtils

A package that contains certain utilities I use for my Discord bots

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Cron     = &cron{}
	Database = &db{}
	Env      = &env{}
)

Exports modules

Functions

func WaitFor

func WaitFor(ctx context.Context, diff time.Duration)

WaitFor will block for the specified duration or the context is cancelled

func WaitUntil

func WaitUntil(ctx context.Context, t time.Time)

WaitUntil will block until the given time. Can be cancelled by cancelling the context

Types

type RoleError

type RoleError struct {
	Err error
}

RoleError is an error type for when there is a problem giving a role to a user.

func (RoleError) Error

func (e RoleError) Error() string

Jump to

Keyboard shortcuts

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