File size: 743 Bytes
7a6bd0d
c2c7f13
7a6bd0d
 
 
c2c7f13
 
 
 
 
7a6bd0d
 
 
 
a3c2678
7a6bd0d
c2c7f13
7a6bd0d
c2c7f13
7a6bd0d
 
 
 
 
c2c7f13
7a6bd0d
a3c2678
 
7a6bd0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from fastapi import FastAPI
import logging
# from slack_bolt import App
import os
from routers import slack

# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

# app = App(
#     token=os.environ.get("SLACK_BOT_TOKEN"),
#     signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
# )

api = FastAPI(title="Slack Bot API", version="1.0.0")

api.include_router(slack.router)

# Listens to incoming messages that contain "hello"
# @app.message("hello")
# def message_hello(message, say):
#     # say() sends a message to the channel where the event was triggered
#     say(f"Hey there <@{message['user']}>!")

@api.get("/")
def health_check():
    """Health check"""
    return {"status": "healthy"}