mockstate

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package mockstate provides functionality for creating a mock *discordgo.State.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(optionFuncs ...OptionFunc) (*discordgo.State, error)

New returns a new *discordgo.State with the given optionFuncs applied.

Types

type OptionFunc

type OptionFunc func(state *discordgo.State) error

OptionFunc is a function that can be used to apply different options to a *discordgo.State.

func WithGuilds

func WithGuilds(guilds ...*discordgo.Guild) OptionFunc

WithGuilds adds the given guilds to a *discordgo.State.

func WithUser

func WithUser(user *discordgo.User) OptionFunc

WithUser sets a *discordgo.State.User to the given user.

Jump to

Keyboard shortcuts

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