# Feature

class Feature\<T = unknown> implements [FeatureInterface](https://away-from-keyboard.gitbook.io/afkhandler/eventinterface)\<T>

constructor(options: [FeatureInterface](https://away-from-keyboard.gitbook.io/afkhandler/eventinterface)\<T>)

{% tabs %}
{% tab title="CommonJS" %}

```javascript
const { Feature } = require("afkhandler");

export default new Feature({
  run({ client, gadget }) {
    // run can be execute, callback, fire or emit
    console.log("Hello World!");
  },
});
```

{% endtab %}

{% tab title="ESM" %}

```javascript
import { Feature } from "afkhandler";

export default new Feature({
  run({ client, gadget }) {
    // run can be execute, callback, fire or emit
    console.log("Hello World!");
  },
});
```

{% endtab %}
{% endtabs %}
