Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sharl/slackbot3

sample of slack bot
https://github.com/sharl/slackbot3

slack slack-bot slackbot

Last synced: about 1 month ago
JSON representation

sample of slack bot

Awesome Lists containing this project

README

        

slackbot3
=========

sample script for slackbot

## preinstall
```
git clone https://github.com/sharl/geeklets.git
cp geeklets/.amedas ~
cp geeklets/{amedas,amesh} ~/bin
```

- amesh use imagemagick

## prereq
```
pip install --upgrade slack_sdk aiohttp requests bs4
```

## usage

```
$ SLACK_TOKEN=xoxb-hogehoge ./slackbot3.py
```

## Appendix
```
SLACK_TOKEN=xoxb-hogehoge docker-compose up -p project_name -d
```

## Module usage

### message.switchbot.meter

- config.json
```
"message.switchbot.meter": {
"keyword": "wake word",
"user": "user name (NOT display name)",
"token": "",
"device": ""
}
```

### message.switchbot.plug

- config.json
```
"message.switchbot.plug": {
"on": "on wake word",
"off": "off wake word",
"user": "user name (NOT display name)",
"token": "",
"device": ""
}
```

### message.openai

- config.json
```
"message.openai": {
"prefix": "hamu:",
"sorry": "Sorry, I am not sure.",
"apikey": "sk-xxxxxx"
}
```