help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
slack-bot-assistant
/
bot
/
__pycache__
RSK World
slack-bot-assistant
Slack Bot Assistant - Python + Slack API + SQLite + PHP Dashboard + Bot Commands + Automation
__pycache__
  • app.cpython-313.pyc34.9 KB
  • config.cpython-313.pyc2.3 KB
  • helpers.cpython-313.pyc7.7 KB
  • models.cpython-313.pyc6.1 KB
  • scheduler.cpython-313.pyc5.3 KB
  • utils.cpython-313.pyc15.2 KB
run.py
run.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
Slack Bot Assistant - Main Entry Point
Developer: Molla Samser (Founder, RSK World)
Design & Testing: Rima Khatun
Website: https://rskworld.in
Contact: hello@rskworld.in | +91 93305 39277
Year: 2026
"""

import sys
import os

# Add bot directory to path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'bot'))

from bot.app import app
from bot.config import Config
from slack_bolt.adapter.socket_mode import SocketModeHandler

def main():
    """Main entry point for the Slack Bot Assistant"""
    print("=" * 60)
    print("šŸš€ Slack Bot Assistant - Advanced Edition")
    print("=" * 60)
    print(f"\nšŸ“Š Configuration Status:")
    print(f"   Database: {'āœ… Enabled' if Config.ENABLE_DATABASE else 'āŒ Disabled'}")
    print(f"   Scheduling: {'āœ… Enabled' if Config.ENABLE_SCHEDULING else 'āŒ Disabled'}")
    print(f"   Weather API: {'āœ… Enabled' if Config.ENABLE_WEATHER else 'āŒ Disabled'}")
    print(f"   Translation: {'āœ… Enabled' if Config.ENABLE_TRANSLATION else 'āŒ Disabled'}")
    print(f"   File Handling: {'āœ… Enabled' if Config.ENABLE_FILE_HANDLING else 'āŒ Disabled'}")
    print("=" * 60)
    
    # Check required configuration
    if not Config.SLACK_BOT_TOKEN:
        print("\nāŒ ERROR: SLACK_BOT_TOKEN is not set!")
        print("   Please set SLACK_BOT_TOKEN in your .env file or environment variables.")
        sys.exit(1)
    
    if not Config.SLACK_SIGNING_SECRET:
        print("\nāŒ ERROR: SLACK_SIGNING_SECRET is not set!")
        print("   Please set SLACK_SIGNING_SECRET in your .env file or environment variables.")
        sys.exit(1)
    
    if not Config.SLACK_APP_TOKEN:
        print("\nāŒ ERROR: SLACK_APP_TOKEN is not set!")
        print("   Please set SLACK_APP_TOKEN in your .env file or environment variables.")
        print("   Socket Mode requires an App-Level Token.")
        sys.exit(1)
    
    print("\nāœ… All required configuration found!")
    print("\nšŸ”„ Starting bot...\n")
    
    try:
        # Start the app using Socket Mode
        handler = SocketModeHandler(app, Config.SLACK_APP_TOKEN)
        handler.start()
        print("āœ… Bot is running and listening for events...")
        print("   Press Ctrl+C to stop the bot.\n")
    except KeyboardInterrupt:
        print("\n\nšŸ‘‹ Bot stopped by user. Goodbye!")
        sys.exit(0)
    except Exception as e:
        print(f"\nāŒ Error starting bot: {e}")
        print("\nšŸ’” Troubleshooting:")
        print("   1. Check that all tokens are correct")
        print("   2. Verify Socket Mode is enabled in your Slack app settings")
        print("   3. Ensure your app is installed to your workspace")
        print("   4. Check the logs for more details")
        sys.exit(1)

if __name__ == "__main__":
    main()

75 lines•2.8 KB
python
šŸš€ Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ā¤ļø

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer