embed

package module
v0.0.0-...-d73bb6f Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: GPL-3.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

discord-Simple-EmbedGo

Library to help embeds using Go|Discord

[!NOTE] How to use it, examples, etc. to come!

Documentation

Index

Constants

View Source
const (
	EmbedLimit int = 4000

	EmbedLimitTitle  int = 256
	EmbedLimitField  int = 25
	EmbedLimitFooter int = 2048

	EmbedLimitFieldName   int = 256
	EmbedLimitFieldValue  int = 1024
	EmbedLimitDescription int = 2048
)

Variables

This section is empty.

Functions

func NewErrorEmbed

func NewErrorEmbed(errorTitle, errorMsg string, replacements ...interface{}) *dgo.MessageEmbed

/ Erros

func NewErrorEmbedAdvanced

func NewErrorEmbedAdvanced(errorTitle, errorMsg string, errorColor int) *dgo.MessageEmbed

func NewGenericEmbed

func NewGenericEmbed(embedTitle, embedMsg string, replacements ...interface{}) *dgo.MessageEmbed

func NewGenericEmbedAdvanced

func NewGenericEmbedAdvanced(embedTitle, embedMsg string, embedColor int) *dgo.MessageEmbed

Types

type Embed

type Embed struct {
	*dgo.MessageEmbed
}

func NewEmbed

func NewEmbed() *Embed

Returns a new embed object

func (*Embed) AddField

func (e *Embed) AddField(name, value string) *Embed

func (*Embed) InlineAllFields

func (e *Embed) InlineAllFields() *Embed

Sets all fields in the embed to be inline

func (*Embed) MakeFieldInline

func (e *Embed) MakeFieldInline() *Embed

Adds last field as InLine

func (*Embed) SetAuthor

func (e *Embed) SetAuthor(args ...string) *Embed

func (*Embed) SetColor

func (e *Embed) SetColor(clr int) *Embed

func (*Embed) SetDescription

func (e *Embed) SetDescription(description string) *Embed

func (*Embed) SetFooter

func (e *Embed) SetFooter(args ...string) *Embed

[Text] [iconURL]

func (*Embed) SetImage

func (e *Embed) SetImage(args ...string)

func (*Embed) SetThumbnail

func (e *Embed) SetThumbnail(args ...string)

func (*Embed) SetTitle

func (e *Embed) SetTitle(name string) *Embed

func (*Embed) SetURL

func (e *Embed) SetURL(URL string) *Embed

func (*Embed) Truncate

func (e *Embed) Truncate() *Embed

Truncates any embed value over the character limit.

func (*Embed) TruncateDescription

func (e *Embed) TruncateDescription() *Embed

func (*Embed) TruncateFields

func (e *Embed) TruncateFields() *Embed

Truncates fields that are too long

func (*Embed) TruncateFooter

func (e *Embed) TruncateFooter() *Embed

func (*Embed) TruncateTitle

func (e *Embed) TruncateTitle() *Embed

Jump to

Keyboard shortcuts

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