utils

package
v0.0.0-...-a75bd19 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Block

func Block(s string) string

Block encloses string in code block tags

func Bold

func Bold(s string) string

Bold encloses string in bold tags

func Code

func Code(s string) string

Code encloses string in code tags

func EmojiAlpha

func EmojiAlpha(s string) string

EmojiAlpha Returns a string of the emoji equivalent of the string

func Italics

func Italics(s string) string

Italics encloses string in italics tags

func Mention

func Mention(s string) string

Mention encloses the string in mention tags

func MsgHasRoles

func MsgHasRoles(ses *discordgo.Session, msg *discordgo.Message, roles []string) (bool, error)

MsgHasRoles Checks if the author has the required roles

func MsgInChannels

func MsgInChannels(s *discordgo.Session, m *discordgo.Message, channels []string) (bool, error)

MsgInChannels Checks if message was sent in the required channels

func Reverse

func Reverse(s string) string

Reverse reverses a string, assuming ascii encoding

func Spoil

func Spoil(s string) string

Spoil encloses string in spoiler tags

func Strlen

func Strlen(e interface{}) int

StrLen Recursively searches for strings and counts up the total length

func Under

func Under(s string) string

Under encloses string in underline tags

func Unmention

func Unmention(ses *discordgo.Session, msg *discordgo.Message, str string) string

Unmention returns a string with mentions replaced by nicks/usernames

Types

This section is empty.

Jump to

Keyboard shortcuts

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