Giter Site home page Giter Site logo

discord-remo-bot's Introduction

discord-remo-bot

NatureRemoの室温をDiscordに通知するbotのソースコードです.

※ 利用にはDiscordのBot及びチャンネルの作成及びチャンネルID・トークンの取得が必要です: 参考) Botの作り方について

※ 気温と湿度の通知にはNatureRemoを購入する必要があり,かつNatureRemo APIを使用するためのトークン取得が必要です 参考) Nature Remoの概要, APIについて

実行方法

環境

  • Python 3.7.6
  • discord 1.0.1
  • Docker-compose 1.2.1
  • Docker 19.03.5
  • Raspberry Pi 3 ModelB+ (Raspbian, 64bit)

実行はDocker-composeを推奨しており,Docker-compose up -dコマンドだけでBotが起動します. Docker-composeを使用した場合に限り,"実行しているサーバーのIPアドレス:8080/env"にアクセスすると気温と湿度の推移を確認できます.

Pythonコマンドを使用する場合

もしdocker-composeが使用できない場合は,以下のコマンドを実行してください(Pythonの仮想環境であるvenvの利用をお勧めします)

  1. python -m venv .env
  2. .env/Scripts/Activate.ps1(WindowsのPowershellの場合) or .env/bin/activate (Linuxの場合)
  3. pip install discord pytz
  4. python remo_main.py

Docker-composeを使う場合

  1. Docker-composeをインストールする 参考)Docker-composeについて
  2. DiscordのAPI用のトークン,Botを使用するDiscordのチャンネルID,NatureRemoのAPI用トークンを取得する
  3. remo/config.iniに取得したトークンを追記する
  4. docker-compose upで実行

その他

  • 間違いや修正はIssueかTwitter(@10_2rugata)まで
  • プルリクエスト大歓迎です

履歴

2020/11/04 公開

discord-remo-bot's People

Contributors

temple1026 avatar

Stargazers

 avatar

Watchers

 avatar

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.