Automatically grant roles to users who joined through specific invite.
You can specify invite as invite code or as a link. Role can be specified via mention or it's name (use "quotes" if role has whitespaces in the name). If specified by name, first role with that name will be used.
/ir
will output information about the bot (e.g. version).
/ir settings
will output current guild settings.
/ir settings reset
will reset guild settings to default.
/ir settings <name>
will output current setting value.
/ir settings <name> <value>
will change setting value.
/ir invites
will output invites with roles assigned.
/ir invites <invite>
will output roles assigned to an invite.
/ir invites <invite> clear
will remove all assigned roles from an invite.
/ir invites <invite> add <role>
will assign role to an invite.
/ir invites <invite> remove <role>
will remove role from an invite.
To change settings, use /ir settings <setting name> <value>
.
/ir invite
will print all invites with the role set.
To set role to invite, use /ir invite <invite code or link> <role mention or "role name in quotes">
.
To delete invite, use /ir invite <invite code or link> remove
.
If there is multiple roles/channels by the same name, the most recently created will be used. Prefer using mention in this case.
You need bot account (How to create and invite bot account?) and Java 11. Bot requires Manage Server
, Manage Roles
, View Channels
, Send Messages
permissions to work. Start bot with java -jar InviteRoles-VERSION_HERE.jar
and these arguments:
--token "your bot token here"
- bot token. --db "database_path_here.db"
- SQLite database path. You can stop bot by using stop
console command.
All contributions are welcome. Code style is IntelliJ IDEA default.