MoonlightBot Documentation
  • MoonlightBot Documentation
  • Get Started
    • Options
    • Frequently Asked Questions
    • Permission Tutorial
    • Moderation Tutorial
    • Setting up Reaction Roles
  • Support Our Work
    • Volunteer Opportunities
    • Premium Subscriptions
    • Upvote MoonlightBot
    • Support Server
    • MoonlightBot Beta (early access)
    • Special Thanks
  • Policies
    • Acceptable Use Policy
    • Volunteer Code of Conduct
    • Privacy Policy
  • Management Commands
    • config
    • create-muterole
    • reaction-roles
  • Miscellaneous Commands
    • check-duration
    • premium
    • userconfig
    • Other Minor Commands
  • Moderation Commands
    • ban
    • clean
    • infractions
    • kick
    • mute
    • softban
    • tempban
    • tempmute
    • timeout
    • unban
    • unmute
    • warn
  • Role management Commands
    • list-temproles
    • pause-role
    • role
    • selfrole
    • temprole
  • Utility Commands
    • reminder
    • serverinfo
    • snowflake
    • userinfo
  • Advanced
    • Using developer mode
    • List of log names
Powered by GitBook
On this page
  • Required permissions
  • Syntax
  • Options
  • Logs
  1. Role management Commands

temprole

PreviousselfroleNextreminder

Last updated 7 months ago

This command allows you to assign a role to a user for a specified duration. After the duration has passed, the role will be automatically removed from the user.

Required permissions

MoonlightBot requires the following permissions to successfully execute this command:

  • Manage Roles

By default, a user is required to have the following permissions to use this command:

  • Manage Roles

For more information on editing permission requirements for specific users/roles, refer to the

Syntax

/temprole <user> <role> <duration> [reason] [notify]

Options

  • user: The user to assign the role to

  • role: The role to assign to the user

  • duration: The duration for which the role should be assigned to the user. For more information on the duration format, refer to the

  • reason: The reason for assigning the role to the user. This is an optional parameter, which can be used for record-keeping

  • notify: Sends a Direct Message to inform the user about the temporary role addition. This is optional and contains the role name, duration, expiration date and reason

Logs

  • TEMPROLE_EXTEND: This log is triggered when a temporary role's duration is extended/reduced. It will log the user, the role, the responsible moderator, the reason and the duration of the extension/reduction.

  • TEMPROLE_ADD: This log is triggered when a temporary role is assigned to a user. It will log the user, the role, the responsible moderator, the reason and the duration of the role assignment.

For more information on setting up those logs, refer to the

permissions tutorial
log setup tutorial
options page