DOCUMENTATION / MODERATION & VERIFICATION

Keep a good thing safe.

Moderate deliberately, and give roles only after your own verification checks succeed.

Work within the hierarchy

Moderation requires ModerateMembers. The bot can kick, ban, unban or time out only members below its managed role, and can never moderate the owner. Timeouts last up to 28 days. ManageMessages permits deleting another author’s individual community message.

ManageRoles permits assigning only roles selected during installation or created by that bot. These roles must be below the bot and cannot grant community administration. No verification badge or button alone grants administrative access.

A verification flow

The installer must explicitly select VERIFIED_ROLE_ID as assignable. A bot’s verification workflow is your application logic; Relay does not claim that clicking a button proves identity or humanity. The example uses a community passphrase only as a demonstration, not identity verification.

JavaScript
if (interaction.commandName === 'verify') {
  // Run your actual verification checks before this action.
  const passed = await verifyMember(interaction.user.id);
  if (!passed) return interaction.reply('Verification is still needed.');
  await bot.members.addRole(interaction.communityId,
    interaction.user.id, process.env.VERIFIED_ROLE_ID);
  await interaction.reply('You’re verified. Welcome aboard!');
}

Keep an audit trail

Bot installs, uninstalls and mutations write to the existing community audit table under bot:<application ID>. Store your own case IDs and reasons in application storage or your database. Never log bot tokens or private form answers.