Skip to content

auto_masking

test edited this page Oct 24, 2024 · 17 revisions

Set user nicknames.

Automatically add and remove discord roles:

  • Applicant and member roles
  • Set city range roles (e.g. c1-10, c11+)
  • Tax bracket roles (e.g. 25/25)
  • Specific or top alliance name roles
  • Sync roles (e.g. for a coalition or milcom server)

Prerequisites

Configure your role aliases, as seen on the Locutus/Wiki/setup page.

Alliance, City, Tax related roles

Have an alliance set OR delegate to a server with an alliance OR set the allies coalition (and no alliance set)

  • /settings_default registeralliance

  • /settings_default delegate_server

  • /coalition add

Nicknames

📚 Options: { FALSE,LEADER,NATION,DISCORD,NICKNAME }...
/settings_role autonick

Options: { FALSE,LEADER,NATION,DISCORD,NICKNAME }
See also: </role clearnicks:1296835312302948360>

Arguments:

<mode> - AutoNickOption
Mode for automatically giving discord nicknames


📚 Clear all nicknames on discord
/role clearnicks

Clear all nicknames on discord

Arguments:

[undo] - Boolean
Undo the last recent use of this command


Verified roles

Give a role to all nations registered with the bot using /register

/role setalias locutusrole: REGISTERED discordrole: @registered

Manually running the autorole task

For all users

/role autoassign

For a single user

/role autorole member: @user

Alliance Name Roles

Options

  • FALSE: No roles given
  • ALL: Alliance roles created for all (see: AUTOROLE_TOP_X)
  • ALLIES: Alliance roles created for allies (see: allies coalition)

/settings_role autorole_alliances mode: ALL

📚 The ingame rank required to get an alliance role....
/settings_role autorole_alliance_rank

The ingame rank required to get an alliance role.
Default: member
Options: { LEADER,HEIR,OFFICER,MEMBER,APPLICANT,REMOVE,BAN,UNBAN,INVITE,UNINVITE }

Arguments:

<allianceRank> - Rank
One of the default in-game position levels


Give alliance name roles to the top alliances (or set it to 0)

📚 The number of top alliances to provide roles for, defaults to 0...
/settings_role autorole_top_x

The number of top alliances to provide roles for, defaults to 0
Alliances added to MASKEDALLIANCES:Additional alliances to mask with /role autoassign (if alliance masking is enabled)`` are still included outside this range

Arguments:

<topScoreRank> - Integer
A whole number


Add specific alliances

/coalition add alliances: coalitionname: MASKEDALLIANCES

Clear alliance roles

Options

  • UNUSED: Alliance name roles which have no members
  • ALLIANCE: All alliance name roles
  • DELETED_ALLIANCES: Alliance name roles with no valid in-game alliance
  • INACTIVE_ALLIANCES: Alliance name roles with no active members
  • NOT_ALLOW_LISTED: Alliance name roles not in the allow list (defined by settings:AUTOROLE_ALLIANCES,AUTOROLE_TOP_X and coalition:MASKEDALLIANCES``
  • NON_MEMBERS: Users who are not in the alliance in-game
  • NON_ALLIES: Users who are not in the alliance, or the allies/offshore coalition in-game

/role clearallianceroles type:

Applicant / Member roles

Register your alliance:

/settings_default registeralliance alliances:

Create the roles on discord:

/role setalias locutusrole: APPLICANT discordrole: @applicant

/role setalias locutusrole: MEMBER discordrole: @member

Enable auto role for member and applicant:

/settings_role autorole_member_apps enabled: true

City Range roles

Create a discord role. All city name roles start with c, and are inclusive:

  • To create range, use a dash: c1-10
  • For a single city count, use a number: c11
  • For a range to infinity, use a plus: c12+

Overlapping ranges are not supported. Run the auto role command to assign.

Tax roles

Ensure you have provided your api key

/settings_default registerapikey apikeys:

To create and assign a tax role:

  • Create a discord role named as the tax rate, i.e. 25/25.
  • Run the auto role command.

No other formats are currently supported.

Conditional roles

Auto assign roles based on conditions See: https://github.com/xdnw/locutus/wiki/nation_placeholders Accepts a list of filters to a role. In the form:

#cities<10:@someRole
#cities>=10:@otherRole

Use * as the filter to match all nations. Only alliance members can be given roles Use /role autoassign to auto assign

📚 Auto assign roles based on conditions...
/settings_role addconditionalrole

Auto assign roles based on conditions
See: https://github.com/xdnw/locutus/wiki/nation_placeholders
Accepts a list of filters to a role.
In the form:

#cities<10:@someRole
#cities>=10:@otherRole

Use * as the filter to match all nations.
Only alliance members can be given roles
Use </role autoassign:1296835312302948360> to auto assign

Arguments:

<filter> - NationFilter
A comma separated list of filters (can include nations and alliances)
<role> - Role
A discord role name or mention


Sync roles

Give the aliased bot roles to all members based on the roles they have in their respective alliance server

This cannot be enabled on an alliance server, and is intended for coalitions

Set the allies coalition:

/coalition add alliances: coalitionname: ALLIES

/coalition list

Enable ally gov roles:

/settings_role autorole_ally_gov enabled: true

Specify the roles

📚 List of roles to autorole from ally servers...
/settings_role autorole_ally_roles

List of roles to autorole from ally servers
(this is intended for coalition servers to give gov roles to allies)

Arguments:

<roles> - Set
A comma separated list of bot Roles


Bulk role add/remove

Bulk add/remove a specific role

📚 Add or remove a role from a set of members on discord
/role mask

Add or remove a role from a set of members on discord

Arguments:

<members> - Set
A comma separated list of discord user mentions, or if a nation name, id or url if they are registered
<role> - Role
A discord role name or mention
<value> - boolean
[-r toggleMaskFromOthers] - boolean
If the role should be added or removed from all other members
If value is true, the role will be removed, else added


Bulk add/remove multiple roles via a sheet

📚 Add or remove a role from a set of members on discord based on a spreadsheet...
/role mask_sheet

Add or remove a role from a set of members on discord based on a spreadsheet
By default only roles will be added, specify removeRoles to remove roles from users not assigned the role in the sheet
Specify listMissing to list nations that are not assigned a role in the sheet
Columns:

  • nation, leader, user, member (at least one)
  • role, role1, roleN (multiple, or use comma separated values in one cell)

Arguments:

<sheet> - SpreadSheet
A google spreadsheet id or url
For shorthand, use a comma when specifying the sheet tab e.g. sheet:ID,TAB_NAMEFor a url, append #gid=1234 or #tab=tabName to specify the id of the tab to use
[-u removeRoles] - Set
Remove these roles from users not assigned the role in the sheet
(A comma separated list of discord role names or mentions)
[-ra removeAll] - boolean
Remove all roles mentioned in the sheet
[-ln listMissing] - Set
List nations that are not assigned a role in the sheet
(A comma separated list of nations, alliances and filters)
[-f force] - boolean


See also

Locutus/Wiki/self_roles

Clone this wiki locally