# PluginOptions

`interface` in `core/plugin` · v0.11.0

<https://seedcord.org/docs/packages/core/0.11.0/interfaces/plugin-options>

Declares where a plugin may attach. Pass it as the `Plugin<Opts>` type argument. Every field you
narrow goes to `super()` as well. `attach()` fails to compile when the host does not match.

```ts
interface PluginOptions
```

## Examples

```ts
// attaching this to an http bot fails to compile
class Voice extends Plugin<{ transport: 'gateway' }> {
    constructor(host: CoreBase) {
        super(host, { transport: 'gateway' });
    }

    public async init(): Promise<void> {}
}
```

## Properties

### runtime

```ts
runtime?: 'server' | 'edge' | 'any'
```

Which runtime the plugin runs on. `'any'` attaches to either one.

### transport

```ts
transport?: 'gateway' | 'http' | 'any'
```

Which transport the plugin runs on. `'any'` attaches to either one.
