stfu

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

/stfu user:<user> length:<length> - for every message a user sends, the bot will ping the user telling them to stfu

Documentation

Index

Constants

This section is empty.

Variables

View Source
var State = NewState()

Functions

func TellUser

func TellUser(sess *discordgo.Session, mess *discordgo.MessageCreate)

TellUser tell a user to stfu on every message they send.

sess: discord session. mess: the message to check.

Types

type Stfu

type Stfu struct{}

tell a user to stfu for a selected period of time

type StfuState

type StfuState struct {
	// length of time to stfu for
	Length time.Duration
	// if the command is in cool down state
	IsCoolDown bool
	// length of cool down
	CoolDownLength time.Duration
	// the user to stfu
	User *discordgo.User
	// if the command is in use right now
	InUse bool
}

func NewState

func NewState() StfuState

NewState creates a new stfu state with default values

Jump to

Keyboard shortcuts

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