utils

package
v0.0.0-...-eae27d5 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkDeleteMessages

func BulkDeleteMessages(ds *discordgo.Session, channelID string, messageIDs []string) error

func GetAllMembers

func GetAllMembers(ds *discordgo.Session, guildID string) ([]*discordgo.Member, error)

func GetChannelLogger

func GetChannelLogger(ds *discordgo.Session, channelID string) *log.Logger

func JSTTime

func JSTTime(t time.Time) string

JSTTime Print a timestamp in Japanese format

func OutputTextToFile

func OutputTextToFile(ds *discordgo.Session, channelID, filename, text string)

func PrintBody

func PrintBody(c *gin.Context)

PrintBody Prints the body of the HTTP request in the given context

func PrintJSON

func PrintJSON(obj interface{})

PrintJSON prints the interface as json to stdout

func PrintJSONStr

func PrintJSONStr(obj interface{}) string

PrintJSONStr Outputs a json representation as a string

func PrintPipe

func PrintPipe(obj interface{}, collection string)

PrintPipe prints a pipe in a format that can be imported into Studio 3T

Types

type ChannelLogger

type ChannelLogger struct {
	Session   *discordgo.Session
	ChannelID string
}

func (ChannelLogger) Write

func (cl ChannelLogger) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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