mover

package
v0.0.0-...-f692fd6 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MoveAllMembers

func MoveAllMembers(servants []*discordgo.Session, m *discordgo.MessageCreate, guild *discordgo.Guild, dest string, afk bool) (string, error)

MoveAllMembers wraps MoveAndRetry with councurrent calls and error reporting.

Inputs:

s *discordgo.Session : the session that called this handler
m *discordgo.MessageCreate : the message event used to check for permissions to move
guildID string : the ID of the server (guild) where the request was originated
dest string : the ID of the Voice Channel the user will be moved to
afk bool : move users from afk channel

func MoveAndRetry

func MoveAndRetry(s *discordgo.Session, guildID, userID, dest string, retry int) error

MoveAndRetry is a wrapper on top of discordgo.Session.GuildMemberMove with a retry function

Inputs:

s *discordgo.Session : the session that called this handler
guildID string : the ID of the server (guild) where the request was originated
userID string : the ID of the user that is going to be moved
dest string : the ID of the Voice Channel the user will be moved to
retry int: the amount of retrys this function will allows

func MoveDestination

func MoveDestination(s *discordgo.Session, workers []*discordgo.Session, m *discordgo.MessageCreate, guild *discordgo.Guild, prefix string, destination string) (string, error)

MoveDestination function moves discord users

func MoveMembers

func MoveMembers(servants []*discordgo.Session, guild *discordgo.Guild, origin string, dest string) (string, error)

MoveMembers wraps MoveAndRetry with councurrent calls and error reporting.

Inputs:

s *discordgo.Session : the session that called this handler
guildID string : the ID of the server (guild) where the request was originated
origin string : the ID of the Voice Channel the user will be moved from
dest string : the ID of the Voice Channel the user will be moved to

func MoveOriginDestination

func MoveOriginDestination(s *discordgo.Session, workers []*discordgo.Session, m *discordgo.MessageCreate, guild *discordgo.Guild, prefix string, origin string, destination string) (string, error)

MoveOriginDestination function moves discord users

Types

This section is empty.

Jump to

Keyboard shortcuts

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