😈 Timezone notifier bot for Discord
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
scripts
.gitignore
README.md
index.js Testing fix for nickname vs username issue Aug 9, 2018
package-lock.json
package.json

README.md

timezone-bot

A simple timezone bot for Discord servers.


Allows users to set their timezone, then passively notes timezones when appropriate.

Read more about this project Here.

Setup:

There are several APIs you will need to set up.

Sign up for google's apis at https://console.cloud.google.com/apis/, and activate the Geocoding API and the Timezone API for your project. Save your API key for later. You'll have to sign up for this with a credit card, but you can set hard limits in the API console to stop it from crossing into paid territory.

Also, sign up for a Discord developer account at https://discordapp.com/developers/applications/. Create a new bot, and name it whatever you want. The discord server owner must add the bot to the channel manually.
A great guide for setting up a bot, getting a token, and adding it to a server can be found here: https://discordjs.guide/#/preparations/setting-up-a-bot-application

Next, create a file called .env in your project root. This is where you will keep your keys and logins. Structure this file as:

DISCORD_KEY=
BOT_ID=
GOOGLE_API_KEY=
DEBUG=true

Make sure to fill in the appropriate information. DISCORD_KEY is your bot's token. BOT_ID is the unique Client ID of your bot as listed on the Discord developer page for your bot.

Then, run:

npm install
npm start

Commands:

  • !time <user, city, or country name> to see the current time for a specific user or in a specific place.
  • !set <city or country name> to set your own timezone.
  • !users or !all to see all users' set timezones.
  • !help to show a message listing all commands.