RaenonX-PokemonSleep/eevee-sleep-discord-bot

Auto mouth-sealing system (member joining eligibility evaluation)

Closed this issue · 0 comments

Behavior

When a certain role is configured to require certain conditions (for example, account age) for having it, when the user got that role, the bot takes it off and sends the user a note regarding the restriction.

The note should have something like this (in embed):

The role (name) in (server link) requires account age of at least (days) days to prevent server raiding.
You will be able to have (name) after (discord timestamp).

If you really want to join our Discord right away, please contact <my_discord_ping> for eligibility review.

Command

/role-restrict add <role> <account_age_days>

Adds the account age condition to the role so <role> owner must have the account age greater than <account_age_days> days.

/role-restrict remove <role>

Removes the role restriction condition(s) on <role>. This will remove the record entry instead of marking the condition nullish.

/role-restrict bypass <role> <user>

Whitelist <user> so <user> can get <role> without satisfying the restriction.

Data

Each entry of data should look like the following with roleId being a unique index:

{
  roleId: number,
  accountAgeDays: number | null,  // Currently always has a value, but optionality reserved for future condition expansion that could make this field optional
}