mockchannel

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

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

Types

type OptionFunc

type OptionFunc func(channel *discordgo.Channel)

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

func WithGuildID

func WithGuildID(guildID string) OptionFunc

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

func WithID

func WithID(id string) OptionFunc

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

func WithName

func WithName(name string) OptionFunc

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

func WithPermissionOverwrites

func WithPermissionOverwrites(permissionOverwrites ...*discordgo.PermissionOverwrite) OptionFunc

WithPermissionOverwrites sets a *discordgo.Channel.PermissionOverwrites to the given permissionOverwrites.

func WithType

func WithType(channelType discordgo.ChannelType) OptionFunc

WithType sets a *discordgo.Channel.Type to the given channelType.

Jump to

Keyboard shortcuts

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