# Subscriber

`class` in `seedcord` · v0.11.0

<https://docs.seedcord.org/packages/seedcord/0.11.0/classes/subscriber>

Abstract base class for handling application subscribers.

Provides type-safe access to subscribers data and the core framework instance. Extend this class to create custom subscriber handlers.

```ts
abstract class Subscriber<KeyOfSubscribers extends SubscriptionKey>
```

## Constructors

### constructor

```ts
Subscriber(
    data: AllSubscriptions[KeyOfSubscribers],
    core: Core
)
```

Instantiates the subscriber with event data and core.

## Properties

### core

```ts
protected readonly core: Core
```

### data

```ts
protected readonly data: AllSubscriptions[KeyOfSubscribers]
```

### logger

```ts
protected readonly logger: Logger
```

## Methods

### execute

```ts
public abstract async execute(): Promise<void>
```

Executes the subscriber handler logic.
