timer

package
v0.0.0-...-82a33b0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WaitTimer

type WaitTimer struct {
	// contains filtered or unexported fields
}

WaitTimer is used to call a given method once the wait time has been reached.

func NewWaitTimer

NewWaitTimer creates a waitTimer with the given configuration information.

func (*WaitTimer) Cancel

func (t *WaitTimer) Cancel()

Cancel disables the wait timer.

func (*WaitTimer) Start

func (t *WaitTimer) Start(msgFunc func(s *discordgo.Session, i *discordgo.InteractionCreate, action string) error)

Start starts the wait timer. Once it expires, `methodToCall` is called. The timer can be cancelled by calling `canel()`.

Jump to

Keyboard shortcuts

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