"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.
"iyashi" is a Japanese word meaning "soothing" or "healing" mentally and physically.
We need "iyashi", let's get "iyashi"!
- Slack
- Cloudflare
- wrangler CLI
- Microsoft Azure Custom Vision API
- cat
- にゃーん
- ニャーン
- chinchilla
- チンチラ
- ちんちら
- dog
- わんわん
- ワンワン
- hedgehog
- ハリネズミ
- はりねずみ
- owl
- フクロウ
- ふくろう
- ほーほー
- ホーホー
Please create an issue if you have any animals you would like to see supported!
-
Copy env file and enter your environment variables.
cp .dev.vars.example .dev.vars
-
Create database and tables
npx wrangler d1 create iyashi npx wrangler d1 execute iyashi --file=./schema.sql
-
Edit wrangler.toml
[[d1_databases]] binding = "DB" # i.e. available in your Worker on env.DB database_name = "iyashi" database_id = "xxxx-yyyy-zzzz"
-
Deploy to Cloudflare
wrangler deploy
-
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