Skip to main content
Management commands help maintain server quality and organization without directly punishing users.

/clear

Bulk delete messages from a channel with optional user filtering.
amount
Integer
required
Number of messages to delete (1-100)
user
User
Only delete messages from this specific user

Message Archival

All cleared messages are automatically archived before deletion:
// From clear.ts:80-88
const tempActionId = `C${Date.now()}`;

if (messagesArray.length > 0) {
  await MessageLogger.logPurgedMessages(
    messagesArray,
    executor.user.tag,
    tempActionId,
  );
}
The Action ID uses a timestamp format (e.g., C1234567890) for uniqueness.

Behavior

1

Fetch Messages

Retrieves up to 100 messages from the channel
2

Filter (Optional)

If user specified, filters to only that user’s messages
3

Archive

Logs all messages to the archive system with content, attachments, and metadata
4

Delete

Performs bulk deletion via Discord API
5

Log

Creates moderation log entry with Action ID

Example Usage

/clear amount:50
Messages older than 14 days cannot be bulk deleted due to Discord API limitations. The command will skip these automatically.

/archives

View archived messages from previous clear/purge operations.
actionid
String
Specific Action ID to view (e.g., C1234567890)

Pagination System

Displays 5 messages per page with navigation buttons:
// From archives.ts:148-149
const messagesPerPage = 5;
const totalPages = Math.ceil(purgedMessages.length / messagesPerPage);

Displayed Information

For each archived message:
  • Author tag and user mention
  • Message content (truncated to 100 characters if longer)
  • Number of attachments
  • Number of embeds
  • Original channel
  • Original timestamp
  • Purge date and executor
  • Action ID

⏮️ First

Jump to first page

◀️ Previous

Go back one page

Next ▶️

Go forward one page

Last ⏭️

Jump to last page

Example Implementation

// From archives.ts:70-94
function addMessagesToEmbed(embed: EmbedBuilder, messages: any[]): void {
  for (const message of messages) {
    const purgedDate = new Date(message.purgedAt).toLocaleDateString();
    const originalDate = new Date(message.timestamp).toLocaleDateString();

    let content = message.content;
    if (content.length > 100) {
      content = content.substring(0, 100) + "...";
    }

    let attachmentInfo = "";
    if (message.attachments.length > 0) {
      attachmentInfo = `\n**Attachments:** ${message.attachments.length} file(s)`;
    }

    embed.addFields({
      name: `📜 Message by ${message.authorTag}`,
      value: `**Content:** ${content || "[NO TEXT]"}${attachmentInfo}\n**Channel:** <#${message.channelId}>\n**Original Date:** ${originalDate}`,
      inline: false,
    });
  }
}
Archives are displayed as ephemeral messages (only visible to the command user) to maintain privacy.

/slowmode

Set channel rate limiting (slowmode) to control message frequency.
seconds
Integer
required
Slowmode duration in seconds (0-21600)Set to 0 to disable slowmode
reason
String
Reason for enabling/disabling slowmode (defaults to “Maintaining sacred order”)

Duration Limits

  • Minimum: 0 seconds (disabled)
  • Maximum: 21,600 seconds (6 hours)
  • Only works in guild text channels

Implementation

// From slowmode.ts:57
await channel.setRateLimitPerUser(seconds, reason);

await ModerationLogger.addEntry({
  type: "slowmode" as any,
  userId: "N/A",
  userTag: "N/A",
  moderatorId: executor.id,
  moderatorTag: executor.user.tag,
  reason: `${seconds === 0 ? "Disabled" : "Set"} slowmode in #${channel.name}${seconds > 0 ? ` (${seconds}s)` : ""}`,
  guildId: interaction.guild.id,
  duration: seconds > 0 ? seconds : undefined,
});

Example Usage

/slowmode seconds:5 reason:High activity period

Visual Feedback

The response embed changes based on the action:
  • Color: Gold (#FFD700)
  • Title: ⛈️ RESTRAINT IMPOSED
  • Description: Shows channel and duration
  • Wisdom: “Patience brings wisdom, and wisdom brings understanding”
Slowmode applies to all users except those with Manage Channel or Manage Messages permissions.

/sins

View moderation history and records for users or the entire server.
user
User
The user whose moderation records to view (omit for global server history)

Display Modes

User-Specific History

Shows all moderation actions for a specific user:
  • Ban records (B#)
  • Kick records (K#)
  • Timeout records (T#)
  • Warning records (W#)
  • Clear action records (C#)
Each entry includes:
  • Action type and ID
  • Timestamp
  • Moderator who executed the action
  • Reason provided

Global Server History

Shows recent moderation actions across the entire server (paginated):
  • Last 10 actions by default
  • Includes all moderation types
  • Sorted by most recent first
  • Interactive pagination with Next/Previous buttons
// From sins.ts:16-23
export const data = new SlashCommandBuilder()
  .setName("sins")
  .setDescription("Behold the records of the damned, no parameters shows global sins")
  .addUserOption((option) =>
    option
      .setName("user")
      .setDescription("The soul whose sins thou seekest to view")
      .setRequired(false),
  );

Clean Record Response

If a user has no moderation history:
  • Green embed color
  • “Clean slate” message
  • Encourages others to follow their example
All moderation actions are automatically logged to the sins database with unique Action IDs for easy reference and reversal via /removesin.

/help

Display an interactive paginated guide to all bot commands. No parameters required

Features

  • 5 pages organized by permission level and category
    • Page 1: Admin Commands (ALTERMINISTRATOR)
    • Page 2: Moderator Commands
    • Page 3-5: Basic Commands (split across 3 pages)
  • Interactive Navigation:
    • ⏮️ First (jump to Admin page)
    • ◀️ Previous
    • Next ▶️
    • ⏭️ Last (jump to Basic 3 page)
  • 5-minute timeout - buttons disable after 5 minutes of inactivity

Command Format

Each command is displayed with:
  • Command syntax with parameters
  • Brief description
  • Permission level indicator
// From help.ts:22-183
const commands: CommandInfo[] = [
  // Admin commands
  { name: "/ban @user [-reason]", value: "Eternal banishment for heretical defiance", category: "admin" },
  { name: "/interchat >subcommand", value: "Create a chatroom across servers", category: "admin" },
  // ... and more
];
Only the user who invoked /help can use the navigation buttons. Others attempting to click will receive an ephemeral error message.

/info

Display bot information including version, uptime, and latest GitHub commit. No parameters required

Displayed Information

  • Bot Name: Aphonos
  • Bot Description: Divine enforcer of Alteruism
  • Latest Commit:
    • Commit SHA (7 characters)
    • Commit message (first line)
    • Commit date and time
    • GitHub link to commit
  • Technology Stack:
    • Discord.js v14
    • Node.js runtime
    • TypeScript
  • Links:
    • GitHub Repository
    • Server Invite
    • Support resources
// From info.ts:27-39
const response = await fetch(
  "https://api.github.com/repos/Paradoxum-Wikis/ALTERSHAPER-Bot/commits/main",
);

if (response.ok) {
  const data = (await response.json()) as GitHubCommit;
  const commitDate = new Date(data.commit.author.date);
  const commitMessage = data.commit.message.split("\n")[0];
  const commitSha = data.sha.substring(0, 7);
  
  commitInfo = `**[${commitSha}](${data.html_url})** - ${commitMessage}`;
}
The info command fetches live data from the GitHub API to always show the most recent commit information.

Build docs developers (and LLMs) love