utils

package
v0.0.0-...-e2d74ad Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserIDRegex    = regexp.MustCompile("<@!?([0-9]+)>")
	RoleIDRegex    = regexp.MustCompile("<@&?([0-9]+)>")
	ChannelIDRegex = regexp.MustCompile("<#([0-9]+)>")
)

Functions

func ChangeStatus

func ChangeStatus(s *discordgo.Session, msg string)

func ChannelDetails

func ChannelDetails(channelID string, s *discordgo.Session) (*discordgo.Channel, error)

func ComesFromDM

func ComesFromDM(s *discordgo.Session, m *discordgo.MessageCreate) (bool, error)

func DeleteMessage

func DeleteMessage(m *discordgo.Message, s *discordgo.Session)

func GetGuildID

func GetGuildID(chanID string, s *discordgo.Session) (string, error)

func GetMessages

func GetMessages(amount int, channelID string, s *discordgo.Session) (list []*discordgo.Message, err error)

func GuildDetails

func GuildDetails(guildID string, s *discordgo.Session) (*discordgo.Guild, error)

func MemberDetails

func MemberDetails(guildID, memberID string, s *discordgo.Session) (*discordgo.Member, error)

func PermissionDetails

func PermissionDetails(authorID, channelID string, s *discordgo.Session) (int, error)

func SendUserDM

func SendUserDM(s *discordgo.Session, userID string, msg string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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