embed

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package embed handles discord message embed construction and formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Colour int `json:"colour"`

	Name      string `json:"name"`
	Icon      string `json:"icon"`
	Thumbnail string `json:"thumbnail"`
}

Author of an embed.

func (Author) Add

func (a Author) Add(embed *discordgo.MessageEmbed)

Add an author to the embed.

type Authors

type Authors struct {
	store.Data
	// contains filtered or unexported fields
}

Authors known by the system.

func NewAuthors

func NewAuthors(object store.Object) *Authors

NewAuthors returns a new store backed set of authors.

func (*Authors) Get

func (a *Authors) Get(name string) Author

Get the details for a specific author.

type Definition

type Definition struct {
	Colour int
	Detail string
	Author string
}

Definition for an embd.

func (Definition) Build

func (d Definition) Build(author Author) *discordgo.MessageSend

Build the embed into a message.

Jump to

Keyboard shortcuts

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