mockrole

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

Documentation

Overview

Package mockrole provides functionality for creating a mock *discordgo.Role.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

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

Types

type OptionFunc

type OptionFunc func(*discordgo.Role)

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

func WithID

func WithID(id string) OptionFunc

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

func WithName

func WithName(name string) OptionFunc

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

func WithPermissions

func WithPermissions(permissions int64) OptionFunc

WithPermissions sets a *discordgo.Role.Permissions to the given permissions.

Jump to

Keyboard shortcuts

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