mockmember

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 mockmember provides functionality for creating a mock *discordgo.Member.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

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

Types

type OptionFunc

type OptionFunc func(member *discordgo.Member)

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

func WithGuildID

func WithGuildID(guildID string) OptionFunc

WithGuildID sets a *discordgo.Member.GuildID to the given guildID.

func WithRoles

func WithRoles(roles ...*discordgo.Role) OptionFunc

WithRoles adds the given roles to a *discordgo.Member.Roles.

func WithUser

func WithUser(user *discordgo.User) OptionFunc

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

Jump to

Keyboard shortcuts

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