This project triggers sending messages to a specific slack channel. The meesages contain information of the subreddits' hot posts.
- Create a slack application.
- Install the application on your slack workspace.
- In
OAuth & Permissions
, addchat:write
forBot Token Scopes
. - Create a new channel and add the application in it.
- Setup the following secrets for this repo.
SLACK_CHANNEL_ID
SLACK_OAUTH_TOKEN
- Add subreddit names in
.github/workflows/slack-message.yml
.
$ python main.py -h
usage: main.py [-h] [--token TOKEN] [--channel-id CHANNEL_ID] [--subreddit SUBREDDIT]
[--n-posts N_POSTS]
options:
-h, --help show this help message and exit
--token TOKEN Slack API Token
--channel-id CHANNEL_ID
Slack Channel ID
--subreddit SUBREDDIT
Subreddit Name
--n-posts N_POSTS Max Posts Number