Skip to content
On this page

Inhibitors manager

Set up an inhibitors manager to load inhibitors.

Setup in client

When setting up the client, it is possible to set the manager as a parameter :

js
const { ShewenyClient } = require('sheweny');

const client = new ShewenyClient({
  intents: ['Guilds'],
  managers: {
    inhibitors: {
      directory: './inhibitors', // Directory where the inhibitors are stored
    },
  },
});
ts
import { ShewenyClient } from 'sheweny';

const client = new ShewenyClient({
  intents: ['Guilds'],
  managers: {
    inhibitors: {
      directory: './inhibitors', // Directory where the inhibitors are stored
    },
  },
});

Setup with class

You can also use the class to set up the manager somewhere else :

js
const { ShewenyClient, InhibitorsManager } = require('sheweny');

const client = new ShewenyClient({ intents: ['GUILDS'] });

const InhibsManager = new InhibitorsManager(client, {
  directory: './inhibitors',
});

InhibsManager.loadAll();
ts
import { ShewenyClient, Inhibitorsmanager } = from "sheweny";

const client = new ShewenyClient({ intents: ["GUILDS"] });

const InhibsManager = new InhibitorsManager(client, {
  directory: "./inhibitors",
});

InhibsManager.loadAll()