~nloomans/manytimezones

update readme
cmd/update: fix build
add .gitignore

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~nloomans/manytimezones
read/write
git@git.sr.ht:~nloomans/manytimezones

You can also use your local clone with git send-email.

#Many Timezones Discord Bot

WARNING: The Many Timezones Bot is currently under development and is not ready for any sort of actual use.

Many Timezones is a bot to make it easier to tell in which timezone different members of the server are by adding timezone information to nicknames.

In the future this bot will also support displaying timezone information in the form of a role.

#Commands

#mtz!set-location [location]

Example: mtz!set-location Europe/Amsterdam

This will update your location for the server you are currently in. Your nickname will then automatically be edited to include your current timezone. This timezone will automatically be updated when the timezone of your location changes (e.g. daylight saving).

Not sure what your timezone location is? Use this handy timezone picker made by Keval Bhatt.

#mtz!get-location

Example: mtz!get-location

This command will tell you the location which is currently assigned for you. Unlike your nickname, which may take a short while to update, the result of this will command will always be accurate.

#mtz!clear-location

Example: mtz!clear-location

Don't like to have a timezone next to your nickname? If you remove it manually it will be added back shortly after, so use this command instead to clear it.

#mtz!ping and mtz!pong

Example: mtz!ping

Debug command to check if the bot is listing for commands.

#Required permissions

  • Manage Nicknames: needed to add (UTC+X) to the nickname
  • Send Messages: Needed to reply to bot commands.

The permission integer is: 134219776.

#Setup

The bot is written in Go and can be compiled like this:

go build git.sr.ht/~nloomans/manytimezones
go build git.sr.ht/~nloomans/manytimezones/cmd/update

The following environment variables need to be set:

  • MANYTIMEZONES_TOKEN: The discord bot token to use.

  • MANYTIMEZONES_ERROR_MSG: The error message to give the server if something goes wrong. You could for example use:

    Something went wrong processing your request! Please tell `username#0000` and mention the UUID `%s`.
    

    %s will be replaced with the UUID of the error message. It is required to be included in the string.

#Alternatives

Other discord bots to manage timezones include Friend Time and Time Zone Bot. These bots solve slightly different problems so you might want to use a combination of them.

#License

Copyright © 2020 Noah Loomans and Trent Summerlin

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.