ModerationUtil API

timeout(member, duration, reason)

Timeout a guild member for a specified duration.

Parameters:

  • member - Discord.js GuildMember object
  • duration - Timeout duration in seconds
  • reason - (Optional) Reason for timeout

const success = await ModerationUtil.timeout(member, 3600, 'Breaking rules');
					

clearMessages(channel, amount, filter)

Bulk delete messages with optional filtering.

Parameters:

  • channel - Discord.js TextChannel object
  • amount - Number of messages to delete
  • filter - (Optional) Filter options object

const deleted = await ModerationUtil.clearMessages(channel, 100, {
	user: targetUser,
	contains: 'spam'
});
					

InteractionUtil API

createPoll(question, options)

Create an interactive poll with buttons.

Parameters:

  • question - Poll question string
  • options - Array of option strings

const poll = InteractionUtil.createPoll('Favorite color?', ['Red', 'Blue']);
					

getRoleInfo(role)

Get detailed information about a role.

Parameters:

  • role - Discord.js Role object

const roleInfo = await InteractionUtil.getRoleInfo(role);
					

LoggerUtil API

initialize(options)

Initialize the logging system.

Options:

  • logDirectory - Directory for log files
  • webhookUrl - Discord webhook URL for logs
  • errorWebhookUrl - Webhook URL for errors

await LoggerUtil.initialize({
	logDirectory: 'logs',
	webhookUrl: 'your-webhook-url'
});