Documentation ¶
Overview ¶
Package disdup implements a simple and programmable Discord message bouncer. It can be configured to duplicate messages from only certain guilds, channels or users and can convert messages to a variety of different formats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrClosed = errors.New("duplicator: closed")
)
Duplicator errors.
Functions ¶
This section is empty.
Types ¶
type Duplicator ¶
type Duplicator struct {
// contains filtered or unexported fields
}
func NewDuplicator ¶
func NewDuplicator(conf config.Config) (Duplicator, error)
NewDuplicator initializes and starts running a new duplicator. As soon as this call completes, the duplicator is connected to Discord and serving events.
NOTE: This call returns asynchronously. To wait for the duplicator to complete, use Duplicator.Run or Duplicator.Wait. It is the caller's responsibility to call close and to check for errors from the runner channel.
func (Duplicator) Close ¶
func (d Duplicator) Close()
Close terminates the duplicator. Any errors waiting to be received are discarded and all running goroutines terminate gracefully. It is safe to call Close after an error, although it is seldom necessary.
func (Duplicator) Run ¶
func (d Duplicator) Run() error
Run runs the duplicator until an error occurs or the duplicator is instructed to stop.
func (Duplicator) Wait ¶
func (d Duplicator) Wait() chan error
Wait returns a channel over which a single error may be received on duplicator termination.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
disdup/conf
Package clconf loads CLient Conf from configuration files.
|
Package clconf loads CLient Conf from configuration files. |
disdup/out
Package out implements custom or higher level outputs than that which are implemented by Disdup directly.
|
Package out implements custom or higher level outputs than that which are implemented by Disdup directly. |
Package output is the collection of standard outputs for use with disdup.
|
Package output is the collection of standard outputs for use with disdup. |