Documentation ¶
Overview ¶
Package format https://discord.com/developers/docs/reference#message-formatting
Index ¶
- func AnimatedEmoji[T ID](name string, id T) string
- func Channel[T ID](id T) string
- func Emoji[T ID](name string, id T) string
- func Role[T ID](id T) string
- func Timestamp(ts time.Time) string
- func TimestampStyled(ts time.Time, style TimestampStyle) string
- func User[T ID](id T) string
- func UserNick[T ID](id T) string
- type ID
- type TimestampStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnimatedEmoji ¶
AnimatedEmoji returns a custom animated emoji
func TimestampStyled ¶
func TimestampStyled(ts time.Time, style TimestampStyle) string
TimestampStyled returns a styled timestamp
Types ¶
type TimestampStyle ¶
type TimestampStyle string
TimestampStyle https://discord.com/developers/docs/reference#message-formatting-timestamp-styles
const ( TimestampShortTime TimestampStyle = "t" TimestampLongTime TimestampStyle = "T" TimestampShortDate TimestampStyle = "d" TimestampLongDate TimestampStyle = "D" TimestampShortDateTime TimestampStyle = "f" TimestampLongDateTime TimestampStyle = "F" TimestampRelative TimestampStyle = "R" )
Click to show internal directories.
Click to hide internal directories.