Skip to content

"iyashi" is a slack bot that randomly returns the pictures of animals you posted. When you post a picture of an animal, it will be automatically classified and registered.

License

Notifications You must be signed in to change notification settings

Doarakko/iyashi-edge

Repository files navigation

iyashi-edge

"iyashi" is a slack bot that randomly returns the pictures of animals you posted.

When you post a picture of an animal, it will be automatically classified and registered.

example

What is "iyashi"

"iyashi" is a Japanese word meaning "soothing" or "healing" mentally and physically.

We need "iyashi", let's get "iyashi"!

Requirements

  • Slack
  • Cloudflare
  • wrangler CLI
  • Microsoft Azure Custom Vision API

Supported animals

  • cat
    • にゃーん
    • ニャーン
  • chinchilla
    • チンチラ
    • ちんちら
  • dog
    • わんわん
    • ワンワン
  • hedgehog
    • ハリネズミ
    • はりねずみ
  • owl
    • フクロウ
    • ふくろう
    • ほーほー
    • ホーホー

Please create an issue if you have any animals you would like to see supported!

Usage

  1. Copy env file and enter your environment variables.

    cp .dev.vars.example .dev.vars
  2. Create database and tables

    npx wrangler d1 create iyashi
    npx wrangler d1 execute iyashi --file=./schema.sql
  3. Edit wrangler.toml

    [[d1_databases]]
    binding = "DB" # i.e. available in your Worker on env.DB
    database_name = "iyashi"
    database_id = "xxxx-yyyy-zzzz"
  4. Deploy to Cloudflare

    wrangler deploy
  5. Set environmental variables to Cloudflare

    wrangler secret put SLACK_BOT_TOKEN
    wrangler secret put SLACK_SIGNING_SECRET
    wrangler secret put ANIMAL_PREDICTION_API
    wrangler secret put ANIMAL_PREDICTION_API_KEY
    wrangler secret put IMAGE_UPLOADED_CHANNEL

About

"iyashi" is a slack bot that randomly returns the pictures of animals you posted. When you post a picture of an animal, it will be automatically classified and registered.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project