Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit 332b8b5b153bd5bd402a6b2f61188be3abf1c41c
parent d543175036be39f86529e24d32780088b44ada83
Author: Demonstrandum <moi@knutsen.co>
Date:   Mon, 23 Mar 2020 16:34:16 +0000

Add yandex and darksky APU to secrets JSON.

Diffstat:
Mgenerate_secrets.sh | 11++++++++++-
Mlib/commands/weather.ts | 2+-
2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/generate_secrets.sh b/generate_secrets.sh @@ -35,11 +35,20 @@ cat <<- JSON "auth_provider_x509_cert_url": "$GOOGLE_AUTH_PROVIDER_X509_CERT_URL", "client_x509_cert_url": "$GOOGLE_CLIENT_X509_CERT_URL" }, + "yandex": { + "geocoder": { + "key": "$YANDEX_GEOCODER_KEY" + } + }, "openweather": { "key": "$OPENWEATHER_KEY" }, + "darksky": { + "key": "$DARKSKY_KEY" + }, "pastebin": { - "key": "$PASTEBIN_KEY" + "key": "$PASTEBIN_KEY", + "password": "$PASTEBIN_PASSWORD" } } JSON diff --git a/lib/commands/weather.ts b/lib/commands/weather.ts @@ -50,7 +50,7 @@ export default (home_scope: HomeScope) => { { name: 'daytime', value: d.main.temp_max + '°C', inline: true }, { name: 'nighttime', value: d.main.temp_min + '°C', inline: true }, { name: 'humidity', value: d.main.humidity + '%', inline: true }, - { name: 'wind', value: `${directions[Math.round(d.wind.deg / 45)]} ${d.wind.speed} ㎧`, inline: true }) + { name: 'wind', value: `${directions[Math.round(d.wind.deg / 45) % directions.length]}, ${d.wind.speed} ㎧`, inline: true }) : new MessageEmbed() .setTitle(`Cannot get weather information from ${location}.`);