Show users timezones as a role within Discord. A handy bot for Discord servers with worldwide communities.
Install required node modules
cd TimezoneRoles
npm install
Project uses Slasher.
To update commands, run either slasher
or npx slasher
(slasher
may not work on Windows machines) or follow these setups.
Discord has a role edit limit of 1000 request every 24 hours.
It is recommended to change the interval at which the setInterval(UpdateRoles, milliseconds)
function is called at (default is every 10 minutes, 60000 milliseconds). To calculate the minimum interval to call use this equation (numberOfRoles * (1440 / minInterval)) * 60000
where number of roles is the amount of timezone roles (not per user).
DiscordTimezoneRoles currently has 3 inbuilt commands but more can be added via the commands.json
file.
/settz <TIMEZONE>
: Sets user's own timezone
/removetz <TIMEZONE>
: Removes a timezone from user
/cleartz
: Clears all timezones from user.
<TIMEZONE>
is a timezone code. List of codes can be found in timezones.json
This project is licensed under the [MIT] License - see the LICENSE file for details
Thanks to Bailey Gibbons for cleaning up my spaghetti code and Jack Davenport for cleaning up the project (and creating Slasher).