embed

package
v0.0.0-...-c2b7375 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package embed contains a builder pattern for Embed building

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embed

type Embed struct {
	*discordgo.MessageEmbed
}

An Embed is a struct that contains a pointer to a discordgo Embed object

func New

func New() *Embed

New creates an empty Embed and returns the struct

func (*Embed) AddField

func (embed *Embed) AddField(title, content string, inline bool) *Embed

AddField adds a field with a title, content, and a flag to indicate whether or not it's inline with the rest of the fields on this line (3 max)

func (*Embed) SetAuthor

func (embed *Embed) SetAuthor(author, url, icon string) *Embed

SetAuthor sets the author field, consisting of a Title, Direct Link, and small Icon

func (*Embed) SetColor

func (embed *Embed) SetColor(c *colors.Color) *Embed

SetColor sets the color of the embed with a premade color

func (*Embed) SetColorRGB

func (embed *Embed) SetColorRGB(r, g, b int) *Embed

SetColorRGB sets the color of the embed with given 0-256 RGB ints

func (*Embed) SetDesc

func (embed *Embed) SetDesc(desc string) *Embed

SetDesc is an alias for SetDescription

func (*Embed) SetDescription

func (embed *Embed) SetDescription(desc string) *Embed

SetDescription sets the description of the embed

func (*Embed) SetFooter

func (embed *Embed) SetFooter(footer string) *Embed

SetFooter sets the footer of this embed

func (*Embed) SetImage

func (embed *Embed) SetImage(url string) *Embed

SetImage sets the image of this embed to a URL

func (*Embed) SetThumbnail

func (embed *Embed) SetThumbnail(url string) *Embed

SetThumbnail sets the thumbnail of this embed to a URL

func (*Embed) SetTimestamp

func (embed *Embed) SetTimestamp(time time.Time) *Embed

SetTimestamp sets the timestamp to a certain Time's String() value

func (*Embed) SetTitle

func (embed *Embed) SetTitle(title string) *Embed

SetTitle sets the title of this embed

Jump to

Keyboard shortcuts

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