Skip to Content
nyx logonyx guide

Events

Reading time:1 min read

It's recommended to read the Events Overview and Event Subscribers pages first.

The ScheduleManager has an EventBus that allows you to listen to events related to schedules.

This is useful for monitoring, logging, or any other custom logic you want to execute when a schedule is added or removed.

Events

The following events are available:

import {  } from '@nyx-discord/djs';

.
  • ScheduleAdd
  • ScheduleRemove

Usage

Subscriber creation

Create a subscriber that will listen to a given event, use the ScheduleEventArgs type for the arguments map. Check the Event Subscribers page for more information.

Subscription

Subscribe to the event using the ScheduleManager's subscribe() method.

await .().();

On this page