ModerationUtil API
timeout(member, duration, reason)
Timeout a guild member for a specified duration.
Parameters:
member
- Discord.js GuildMember objectduration
- Timeout duration in secondsreason
- (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 objectamount
- Number of messages to deletefilter
- (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 stringoptions
- 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 fileswebhookUrl
- Discord webhook URL for logserrorWebhookUrl
- Webhook URL for errors
await LoggerUtil.initialize({
logDirectory: 'logs',
webhookUrl: 'your-webhook-url'
});