DiscordEmitter

abstract class DiscordEmitter<S>(val name: String, val role: Role, dedicatedChannel: Channel)(source)

An emitter hook that can send messages to discord when certain events happen

Inheritors

Constructors

Link copied to clipboard
constructor(name: String, role: Role, dedicatedChannel: Channel)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun handle(subject: S, bot: JDA)

Handles the event, sending es

Link copied to clipboard
fun post(subject: S)

Posts an event of type S to this emitter

Link copied to clipboard
fun subscribe(user: Member)

Subscribes a member to this emitter

Link copied to clipboard
fun unsubscribe(user: Member)

Unsubscribes a member from this emitter

Properties

Link copied to clipboard
val dedicatedChannel: TextChannel

A dedicated channel to which the messages will be posted

Link copied to clipboard

Name of this emitter

Link copied to clipboard
val role: Role

Role that will be pinged by this emitter