I use the code below and when i launch this script i can not stop it. I have tried ctrl+c and others combinations, helps only killing Windows process. Tell me pls, how can i stop the server?
import os
import logging
import re
from typing import Callable
from slack_bolt import App, Say, BoltContext
from slack_sdk.web import WebClient
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
proxy_wired_client = WebClient(
token=os.environ["SLACK_BOT_TOKEN"],
proxy="http://*****:******@**********.com:3131/"
)
# Install the Slack app and get xoxb- token in advance
app = App(
client=proxy_wired_client
)
def extract_subtype(body: dict, context: BoltContext, next: Callable):
context["subtype"] = body.get("event", {}).get("subtype", None)
next()
@app.command("/hello-socket-mode")
def hello_command(ack, body):
user_id = body["user_id"]
ack(f"Hi, <@{user_id}>!")
@app.event("app_mention")
def event_test(say):
say("Hi there!")
if __name__ == "__main__":
SocketModeHandler(app, os.environ["SLACK_APP_TOKEN"]).start()
text = SlackResponse.get(text)
print(text)
I use the code below and when i launch this script i can not stop it. I have tried ctrl+c and others combinations, helps only killing Windows process. Tell me pls, how can i stop the server?