Notification

Methods
29
Fields
2

Getting one

Notification.new(…)
Notification.OFF
Notification.ON

Methods

MethodReturnsDescription
isEnabled()booleanWhether it does anything.
getFlash()FlashNotification?How it flashes the game frame.
getFlashColor()Color?The flash's colour.
getRequestFocus()RequestFocusType?The window focus request it makes.
getSound()NotificationSound?The sound it plays.
getSoundName()string?The name of the custom sound it plays, if any.
getTimeout()numberHow long it shows, in milliseconds.
getVolume()numberThe volume of a custom sound.
isGameMessage()booleanWhether it adds a message to the chatbox.
isInitialized()booleanWhether its settings were filled in: with isOverride, what keeps it from taking the user's.
isOverride()booleanWhether it uses its own settings rather than the user's.
isSendWhenFocused()booleanWhether it fires even when the client is focused.
isTray()booleanWhether it shows a tray notification.
getTrayIconType()anyThe tray notification's icon (TrayIcon.MessageType).
withEnabled(enabled: boolean)NotificationA copy with enabled changed.
withFlash(flash: FlashNotification?)NotificationA copy with flash changed.
withFlashColor(flashColor: Color?)NotificationA copy with flashColor changed.
withGameMessage(gameMessage: boolean)NotificationA copy with gameMessage changed.
withOverride(override: boolean)NotificationA copy with override changed.
withRequestFocus(requestFocus: RequestFocusType?)NotificationA copy with requestFocus changed.
withSendWhenFocused(sendWhenFocused: boolean)NotificationA copy with sendWhenFocused changed.
withSound(sound: NotificationSound?)NotificationA copy with sound changed.
withSoundName(soundName: string?)NotificationA copy with soundName changed.
withTimeout(timeout: number)NotificationA copy with timeout changed.
withTray(tray: boolean)NotificationA copy with tray changed.
withVolume(volume: number)NotificationA copy with volume changed.
withInitialized(initialized: boolean)NotificationA copy with initialized changed.
withTrayIconType(trayIconType: any)NotificationA copy with trayIconType changed.
new(...any)NotificationEvery field, or none. In order: enabled, initialized, override, tray, trayIconType, requestFocus, sound, soundName, `volume…

Fields

FieldTypeDescription
OFFNotificationDisabled.
ONNotificationEnabled, with the user's notification settings.

Returned by

MethodReturnsDescription
NotificationClass.newNotificationEvery field, or none. In order: enabled, initialized, override, tray, trayIconType, requestFocus, sound, soundName, `volume…

Method details

isInitialized

isInitialized: (Notification) -> boolean

Whether its settings were filled in: with isOverride, what keeps it from taking the user's.

new

new: (...any) -> Notification

Every field, or none. In order: enabled, initialized, override, tray, trayIconType, requestFocus, sound, soundName, volume, timeout, gameMessage, flash, flashColor, sendWhenFocused.