> For the complete documentation index, see [llms.txt](https://away-from-keyboard.gitbook.io/afkhandler/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://away-from-keyboard.gitbook.io/afkhandler/classes/feature.md).

# Feature

class Feature\<T = unknown> implements [FeatureInterface](/afkhandler/eventinterface.md)\<T>

constructor(options: [FeatureInterface](/afkhandler/eventinterface.md)\<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 %}
