mockuser

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package mockuser provides functionality for creating a mock *discordgo.User.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(optionFuncs ...OptionFunc) *discordgo.User

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

Types

type OptionFunc

type OptionFunc func(user *discordgo.User)

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

func WithBotFlag

func WithBotFlag(bot bool) OptionFunc

WithBotFlag sets a *discordgo.User.Bot to the given bot flag.

func WithID

func WithID(id string) OptionFunc

WithID sets a *discordgo.User.ID to the given id.

func WithUsername

func WithUsername(username string) OptionFunc

WithUsername sets a *discordgo.User.Username to the given username.

Jump to

Keyboard shortcuts

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