This commit is contained in:
dsyoon
2023-10-10 21:26:51 +09:00
parent 007e060bd9
commit c674896d9a
3 changed files with 21 additions and 0 deletions

View File

@@ -20,6 +20,21 @@ class SlackBot:
return
def post_live_to_slack(self, stock_code):
try:
this_time = datetime.now()
text = "ALIVE (" + this_time.strftime('%Y-%m-%d %H:%M:%S') + ") " + stock_code
result = self.client.chat_postMessage(
channel=self.CHANNEL_ID,
text=text
)
print(text)
except SlackApiError as e:
print(f"Error posting message: {e}")
return
def post_to_slack(self, stock_code, stock_name, type, price, count):
try:
this_time = datetime.now()