mocksession

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: 2 Imported by: 0

Documentation

Overview

Package mocksession provides functionality for creating a mock *discordgo.Session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

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

Types

type OptionFunc

type OptionFunc func(session *discordgo.Session)

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

func WithClient

func WithClient(client *http.Client) OptionFunc

WithClient sets a *discordgo.Session.Client to the given client.

func WithState

func WithState(state *discordgo.State) OptionFunc

WithState sets a *discordgo.Session.State to the given state and sets *discordgo.Session.StateEnabled to true.

Jump to

Keyboard shortcuts

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