# Bot

`class` in `seedcord` · v0.15.0

<https://docs.seedcord.org/packages/seedcord/0.15.0/classes/bot>

Discord bot implementation that manages client and controllers

Don't instantiate this class directly. Use `core.bot` instead.

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Bot` class.

```ts
class Bot extends Plugin<BotEvents>
```

## Properties

### botToken

```ts
public readonly botToken: string
```

### client

```ts
public get client(): Client
```

### commands

```ts
public readonly commands: CommandRegistry
```

### emojis

```ts
public readonly emojis: InjectedEmojiMap
```

### mentions

```ts
public readonly mentions: InjectedMentionMap
```

### name

```ts
name: string;
```

### pluggable

```ts
protected pluggable: Core
```

## Methods

### init

```ts
abstract async init(): Promise<void>
```

Initialize the plugin - implement setup logic here Override this method in your plugin classes

### onHmr

```ts
async onHmr(_event: HmrUpdateEvent): Promise<void>
```

Reloads plugin state on an HMR update.

### registerCriticalFiles

```ts
protected registerCriticalFiles(
    patterns: string[]
): void
```

Registers critical file patterns that should trigger a full restart when changed in Dev HMR.
