discord-tickets / bot

The most popular open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
https://discordtickets.app
GNU General Public License v3.0
957 stars 478 forks source link

Ping different roles depending on the roles the creator has #386

Open eartharoid opened 1 year ago

eartharoid commented 1 year ago

Discussed at dsctickets#2994

<div type 'discussions-op-text'>

Originally posted by King Tiger at 20.04.2021 add ping, like a member have "x" role, ping "x" instead of here suppose if a Member have Spanish role, i want it to Ping Spanish instead of here basically putting a condition to fetch role then ping

eartharoid commented 1 year ago

This new settings format is not backwards compatible so it would either need to also support the existing format ['123'. '456'], or update or reset the property when the bot is updated.

Examples:

// always
// -> @123, @456
{
  mode: 'all',
  roles: ['123', '456']
}
// if the member has both 123 and 234,
// -> @456, @567
{
  mode: 'all',
  roles: {
    '123': '456',
    '234': '567',
  }
}
// if the member has both 123 and 234, assuming 123 is higher in the role hierarchy,
// -> @456
{
  mode: 'highest',
  roles: {
    '123': '456',
    '234': '567',
  }
}