UNPKG

@reaxion/utils

Version:

Core utilities for Reaxion: channels, threads, roles, categories

81 lines (69 loc) 1.71 kB
// This file serves as the main entry point for the utils/core module. // It exports all utility functions and components from various modules. // Import and export client registration import { registerClient, getClient } from './registry.js'; import * as channelUtils from './channelUtils.js'; import * as roleUtils from './roleUtils.js'; import * as threadUtils from './threadUtils.js'; import * as categoryUtils from './categoryUtils.js'; export {registerClient} export { // Channel utilities channelUtils, // Role utilities roleUtils, // Thread utilities threadUtils, // Category utilities categoryUtils, // Feedback command feedbackCommand }; // Individual channel utility functions for convenience export const { getChannel, findChannelByName, channelExists, getTextChannel } = channelUtils; // Individual role utility functions for convenience export const { getRole, findRoleByName, createRole, deleteRole, modifyRole, roleExists, getAllRoles, addRoleToMember, removeRoleFromMember, memberHasRole, getMembersWithRole, setMemberColorRole, getHighestRolePosition, canModerate } = roleUtils; // Individual thread utility functions for convenience export const { getThread, createThread, sendThreadMessage, setThreadArchived, setThreadLocked, addThreadMember, removeThreadMember, isThreadMember, getThreadMembers, listActiveThreads, createForumPost } = threadUtils; // Individual category utility functions for convenience export const { getCategory, findCategoryByName, createCategory, getChannelsInCategory, moveChannelToCategory, createPrivateCategory, categoryExists } = categoryUtils;