nick

package
v0.0.0-...-daa8be9 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPersonNotFound = errors.New("You have not set a nickname.")
	ErrNickExists     = errors.New("Nickname is already in use either by you or someone else.")
)
View Source
var Admin = admin{}
View Source
var AdminDelete = adminDelete{}
View Source
var AdminSet = adminSet{}
View Source
var AdminShow = adminShow{}
View Source
var Advanced = advanced{}
View Source
var AdvancedDelete = advancedDelete{}
View Source
var AdvancedSet = advancedSet{}
View Source
var AdvancedShow = advancedShow{}
View Source
var Normal = normal{}

Functions

func Delete

func Delete(person, place int64) error

Delete deletes the person's nickname in the specified place. If no nickname has been set then returns an ErrPersonNotFound error.

func ParsePerson

func ParsePerson(m *core.Message, place int64, s string) (int64, error)

Tries to find a person from the given string. If "me" is passed the author is returned. Then tries to match a nickname and if it fails it tries various platform specific things (checking if the string is a mention of some sort, etc.)

func ParsePersonHere

func ParsePersonHere(m *core.Message, s string) (int64, error)

Same as ParsePerson but uses the default place instead

func Set

func Set(nick string, person, place int64) (error, error)

Set sets the person's nickname in the specified place. If the nickname already exists in that place then it returns an ErrNickExists error.

func Show

func Show(person, place int64) (string, error, error)

Show returns the person's nickname in the specified place. If no nickname has been set then returns an ErrPersonNotFound error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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