invite

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

Resource is a resource that allows to perform various actions on a Discord guild invite. Create one with Client.Invite.

func NewResource

func NewResource(c resource.RestClient, code string) *Resource

func (*Resource) Delete

func (r *Resource) Delete(ctx context.Context) (*discord.Invite, error)

Delete is like DeleteWithReason but with no particular reason.

func (*Resource) DeleteWithReason

func (r *Resource) DeleteWithReason(ctx context.Context, reason string) (*discord.Invite, error)

DeleteWithReason deletes the invite. Requires the MANAGE_CHANNELS permission. Returns the deleted invite on success. The given reason will be set in the audit log entry for this action.

func (*Resource) Get

func (r *Resource) Get(ctx context.Context, withCounts bool) (*discord.Invite, error)

Get returns the invite. If withCounts is set to true, the returned invite will contain the approximate member counts.

Jump to

Keyboard shortcuts

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