Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,9 +3,9 @@ from discord.ext import commands
|
|
| 3 |
from slack_sdk import WebClient
|
| 4 |
from slack_sdk.errors import SlackApiError
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
SLACK_CHANNEL_ID =
|
| 9 |
|
| 10 |
TRIGGERS = {
|
| 11 |
"urgent": "<@U12345678>",
|
|
@@ -17,7 +17,7 @@ intents.messages = True
|
|
| 17 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
| 18 |
|
| 19 |
# Set up the Slack client
|
| 20 |
-
slack_client = WebClient(token=
|
| 21 |
|
| 22 |
@bot.event
|
| 23 |
async def on_ready():
|
|
@@ -43,4 +43,4 @@ async def post_to_slack(content, slack_mention):
|
|
| 43 |
except SlackApiError as e:
|
| 44 |
print(f"Error posting to Slack: {e.response['error']}")
|
| 45 |
|
| 46 |
-
bot.run(
|
|
|
|
| 3 |
from slack_sdk import WebClient
|
| 4 |
from slack_sdk.errors import SlackApiError
|
| 5 |
|
| 6 |
+
DISCORD_TOKEN = os.getenv('DISCORD_TOKEN')
|
| 7 |
+
SLACK_TOKEN = os.getenv('SIGNING_SECRET')
|
| 8 |
+
SLACK_CHANNEL_ID = os.getenv('CHANNEL_ID')
|
| 9 |
|
| 10 |
TRIGGERS = {
|
| 11 |
"urgent": "<@U12345678>",
|
|
|
|
| 17 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
| 18 |
|
| 19 |
# Set up the Slack client
|
| 20 |
+
slack_client = WebClient(token=SLACK_TOKEN)
|
| 21 |
|
| 22 |
@bot.event
|
| 23 |
async def on_ready():
|
|
|
|
| 43 |
except SlackApiError as e:
|
| 44 |
print(f"Error posting to Slack: {e.response['error']}")
|
| 45 |
|
| 46 |
+
bot.run(DISCORD_TOKEN)
|