discordservice

package
v0.0.0-...-dbefbc8 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscordService

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

Integration provides access to a discord session Discordgo handles rate throttling

func NewDiscordService

func NewDiscordService(session *discordgo.Session, serverID string) DiscordService

NewDiscordService sends a message to a discord channel ID

func (DiscordService) AddRole

func (c DiscordService) AddRole(user, role string) error

AddRole

func (DiscordService) AddUser

func (c DiscordService) AddUser(auth, user, name string) error

AddUser

func (DiscordService) GetChannels

func (c DiscordService) GetChannels() ([]botservice.Name, error)

Get Channels

func (DiscordService) GetMembers

func (c DiscordService) GetMembers() ([]botservice.Name, error)

GetMembers gets all members on the server

func (DiscordService) GetName

func (c DiscordService) GetName() (string, error)

Get the server name

func (DiscordService) GetRoles

func (c DiscordService) GetRoles() ([]botservice.Name, error)

GetRoles gets all the available roles to be assigned

func (DiscordService) KickUser

func (c DiscordService) KickUser(user, message string) error

KickUser kicks a discord user ID

func (DiscordService) RemoveRole

func (c DiscordService) RemoveRole(user, role string) error

RemoveRole

func (DiscordService) SendMessageToChannel

func (c DiscordService) SendMessageToChannel(channel, message string) error

SendMessageToChannel sends a message to a discord channel ID

func (DiscordService) SendMessageToUser

func (c DiscordService) SendMessageToUser(user, message string) error

SendMessageToUser sends a message to a discord user ID

Jump to

Keyboard shortcuts

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