GithubHelp home page GithubHelp logo

discord-bot_weathering_with_u's Introduction

discord-bot_weathering_with_u

森菜々だよ!!!
天気予報Bot
1/16 卒論提出6日前間に合うかチャレンジ
ああああああああああああああああああああああああああああああああああああああああ

環境&tool

  • lang
    • Typescript:3.8.3
      • eslint:6.8.0
    • GAS
  • tools
    • npm:7.0.15
    • node:v15.4.0
    • clasp:2.3.0
    • webpack:4.42.1
  • test
    • jest:25.2.4

使用方法

claspのプロジェクトの作り方、環境変数の埋め込みとか詳しくはこの辺に書いてるよ
今回はDiscordのWebhookとお天気のAPIを使うので、TOKENとAPIキーを取れればおk。
プロパティにセットする変数は WEBHOOK, SECRETKEYとしている。

戒め

URLは有効なURLを書こう。コード400より、Fetch出来ません。

Todo

  • トリガーの設定:issue1
  • 1都市しかまだ設定してないから他も:issue2
  • アバターを埋め込みの中へここ:issu3

API

APIはOpen Weather Mapを使用する。 天気予報の精度が紹介されているWebサイト(URL忘れた)からDark Sky APIというサービスがあったが、Appleに買収されてからAPIキーが発行できないand登録できなくなっている。
いろいろ調べていると、Open Weather Mapにたどり着いた。このページでは、簡単にDark Skyから移行できると書いている。確かにレスポンスの形式が似ていた。

参考

TypescriptのAPIからのレスポンス入れる用のインタフェースを使うのに、JSONから自動で生成してくれるツールがあったのでとっても楽ちん。 インデックスシグネチャ

discord-bot_weathering_with_u's People

Contributors

uewolf25 avatar

Watchers

 avatar

discord-bot_weathering_with_u's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.