utils

package
v0.0.0-...-98f127c Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion(currentVersion string)

func Clear

func Clear()

Clear for windows

func FetchFromURL

func FetchFromURL(url *string) ([]byte, error)

func IsAuthorized

func IsAuthorized(discordID string) bool

func RemoveMessage

func RemoveMessage(s *discordgo.Session, m *discordgo.MessageCreate)

func RemoveMessageAfter

func RemoveMessageAfter(s *discordgo.Session, channelID, messageID string)

Removes a message after n seconds. If RemoveBotMessageAfter in the config is -1 then the message wont be deleted Function automatically run as a goroutine

func SaveImageToDisk

func SaveImageToDisk(fName string, img *image.Image) error

Writes image to disk as a jpeg Do not include the extension in the filename

func SendDirectMessage

func SendDirectMessage(s *discordgo.Session, m *discordgo.MessageCreate, content string) (*discordgo.Message, error)

func SendMessageFailure

func SendMessageFailure(s *discordgo.Session, m *discordgo.MessageCreate, content string) (*discordgo.Message, error)

func SendMessageNeutral

func SendMessageNeutral(s *discordgo.Session, m *discordgo.MessageCreate, content string) (*discordgo.Message, error)

func SendMessageSuccess

func SendMessageSuccess(s *discordgo.Session, m *discordgo.MessageCreate, content string) (*discordgo.Message, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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