logger

package
v0.0.0-...-8bb0e6c Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	ChannelID  string
	Channel    *discordgo.Channel
	LogDeletes bool
	LogEdits   bool
	LogImages  bool
}

Logger represents a logger struct

func New

func New(channelID string, session *discordgo.Session) *Logger

New creates a new logging instance

func (*Logger) OnMessageCreate

func (l *Logger) OnMessageCreate(ds *discordgo.Session, mc *discordgo.MessageCreate)

OnMessageCreate is called whenever a new message is created

func (*Logger) OnMessageDelete

func (l *Logger) OnMessageDelete(ds *discordgo.Session, md *discordgo.MessageDelete)

OnMessageDelete will log deleted messages

func (*Logger) OnMessageEdit

func (l *Logger) OnMessageEdit(ds *discordgo.Session, mu *discordgo.MessageUpdate)

OnMessageEdit is called whenever a message is edited

Jump to

Keyboard shortcuts

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