builder

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package builder is the package that contains all of the builder functions and types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageResponse

type MessageResponse struct {
	// contains filtered or unexported fields
}

MessageResponse is a struct that contains logic for responding to messages.

func NewMessageResponse

func NewMessageResponse(
	ctx context.Context,
	l logger.Logger,
	cc *cachecontainer.CacheContainer,
	hc *http.Client,
) *MessageResponse

NewMessageResponse returns a new MessageResponse.

func (*MessageResponse) Build

Build returns the InteractionResponseData.

func (*MessageResponse) Embed

func (r *MessageResponse) Embed(msg string) *MessageResponse

Embed adds an embed to the response. nolint:gosec // rand.Intn is not used for security purposes.

func (*MessageResponse) Ephemeral

func (r *MessageResponse) Ephemeral() *MessageResponse

Ephemeral makes the response ephemeral.

func (*MessageResponse) Error

func (r *MessageResponse) Error(msg string) *MessageResponse

Error returns an error embed. It is ephemeral and does not mention anyone.

func (*MessageResponse) NoMentions

func (r *MessageResponse) NoMentions() *MessageResponse

NoMentions makes the response not mention anyone.

Jump to

Keyboard shortcuts

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