mockguild

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

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

Types

type OptionFunc

type OptionFunc func(guild *discordgo.Guild)

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

func WithChannels

func WithChannels(channels ...*discordgo.Channel) OptionFunc

WithChannels adds the given channels to a *discordgo.Guild.

func WithID

func WithID(id string) OptionFunc

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

func WithMembers

func WithMembers(members ...*discordgo.Member) OptionFunc

WithMembers adds the given members to a *discordgo.Guild.

func WithName

func WithName(name string) OptionFunc

WithName sets a *discordgo.Guild.Name to the given name.

func WithRoles

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

WithRoles adds the given roles to a *discordgo.Guild.

Jump to

Keyboard shortcuts

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