Skip to content

Discord Tag Role Bot - Automatically assigns and removes roles based on user tags in a Discord server. Supports manual checks with cooldowns and logs role changes.

Notifications You must be signed in to change notification settings

senotron/discord-tag-role

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Discord Tag Role Manager Bot

A Discord bot that automatically assigns or removes a role based on whether a user has a specific tag in their profile. It also supports manual checks with cooldowns to prevent spam.

Features

  • Periodically checks all guild members for a specific tag.
  • Assigns a role if the member has the tag and doesn't already have the role.
  • Removes the role if the member no longer has the tag but still has the role.
  • Logs role changes in a designated log channel with embedded messages.
  • Manual user check with a command !check with a 30-minute cooldown.
  • Rate limiting included to avoid hitting Discord API rate limits.

Requirements

  • Node.js v16 or higher
  • discord.js v14

Configuration

Update the following constants in the source code:

  • TOKEN: Your Discord bot token.
  • TAG: The tag to check for (e.g., 'DTX').
  • ROLE_ID: The ID of the role to assign/remove.
  • GUILD_ID: The ID of your Discord server.
  • LOG_CHANNEL_ID: The ID of the channel where logs will be sent.

Installation

  1. Clone the repository or copy the code.
  2. Run npm install discord.js.
  3. Replace the configuration constants with your own.
  4. Run the bot with node senotron.js (or your filename).

Usage

  • The bot will automatically check members every 10 minutes.
  • Users can manually check their tag and role status by sending !check.
  • If a user tries to run !check within 30 minutes of their last use, they will receive a cooldown message.

License

This project is open source and free to use.

About

Discord Tag Role Bot - Automatically assigns and removes roles based on user tags in a Discord server. Supports manual checks with cooldowns and logs role changes.

Topics

Resources

Stars

Watchers

Forks