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
RSK World
slack-bot-assistant
Slack Bot Assistant - Python + Slack API + SQLite + PHP Dashboard + Bot Commands + Automation
slack-bot-assistant
  • .github
  • __pycache__
  • bot
  • .gitignore336 B
  • CHANGELOG.md2.4 KB
  • FEATURES.md5 KB
  • GITHUB_PUSH_SUMMARY.md2.9 KB
  • ISSUES_FIXED.md3.6 KB
  • LICENSE1.3 KB
  • README.md9.8 KB
  • RELEASE_NOTES.md5.7 KB
  • SETUP.md5.1 KB
  • demo.html28.2 KB
  • index.html14.5 KB
  • requirements.txt196 B
  • run.py2.8 KB
style.csshousing_prices.csvDOCUMENTATION.mdmodels.pyGITHUB_RELEASES.mdFEATURES.md
bot/models.py
Raw Download
Find: Go to:
"""
Slack Bot Assistant - Database Models
Developer: Molla Samser (Founder, RSK World)
Design & Testing: Rima Khatun
Website: https://rskworld.in
Contact: hello@rskworld.in | +91 93305 39277
Year: 2026
"""

from sqlalchemy import create_engine, Column, Integer, String, Text, DateTime, Boolean, Float
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from datetime import datetime
from config import Config

Base = declarative_base()

class UserConfig(Base):
    """Store user preferences and settings"""
    __tablename__ = 'user_configs'
    
    id = Column(Integer, primary_key=True)
    user_id = Column(String(50), unique=True, nullable=False, index=True)
    personality = Column(String(20), default="Professional")
    language = Column(String(20), default="English")
    timezone = Column(String(50), default="UTC")
    created_at = Column(DateTime, default=datetime.utcnow)
    updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)

class Reminder(Base):
    """Store user reminders"""
    __tablename__ = 'reminders'
    
    id = Column(Integer, primary_key=True)
    user_id = Column(String(50), nullable=False, index=True)
    channel_id = Column(String(50))
    message = Column(Text, nullable=False)
    reminder_time = Column(DateTime, nullable=False, index=True)
    is_completed = Column(Boolean, default=False)
    created_at = Column(DateTime, default=datetime.utcnow)

class Task(Base):
    """Store tasks created by users"""
    __tablename__ = 'tasks'
    
    id = Column(Integer, primary_key=True)
    user_id = Column(String(50), nullable=False, index=True)
    channel_id = Column(String(50))
    title = Column(String(200), nullable=False)
    description = Column(Text)
    status = Column(String(20), default="pending")  # pending, in_progress, completed, cancelled
    priority = Column(String(20), default="medium")  # low, medium, high, urgent
    due_date = Column(DateTime)
    created_at = Column(DateTime, default=datetime.utcnow)
    updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)

class MeetingSummary(Base):
    """Store meeting summaries"""
    __tablename__ = 'meeting_summaries'
    
    id = Column(Integer, primary_key=True)
    channel_id = Column(String(50), nullable=False, index=True)
    summary = Column(Text, nullable=False)
    participant_count = Column(Integer, default=0)
    message_count = Column(Integer, default=0)
    created_by = Column(String(50))
    created_at = Column(DateTime, default=datetime.utcnow, index=True)

class MessageSentiment(Base):
    """Store sentiment analysis data for analytics"""
    __tablename__ = 'message_sentiments'
    
    id = Column(Integer, primary_key=True)
    user_id = Column(String(50), index=True)
    channel_id = Column(String(50), index=True)
    message = Column(Text)
    sentiment = Column(String(20))  # POSITIVE, NEGATIVE, NEUTRAL, URGENT
    sentiment_score = Column(Float)
    created_at = Column(DateTime, default=datetime.utcnow, index=True)

class CommandHistory(Base):
    """Store command usage history for analytics"""
    __tablename__ = 'command_history'
    
    id = Column(Integer, primary_key=True)
    user_id = Column(String(50), index=True)
    channel_id = Column(String(50), index=True)
    command = Column(String(50), nullable=False)
    parameters = Column(Text)
    created_at = Column(DateTime, default=datetime.utcnow, index=True)

class Poll(Base):
    """Store polls created by users"""
    __tablename__ = 'polls'
    
    id = Column(Integer, primary_key=True)
    channel_id = Column(String(50), nullable=False, index=True)
    created_by = Column(String(50), nullable=False)
    question = Column(Text, nullable=False)
    options = Column(Text, nullable=False)  # JSON string
    votes = Column(Text)  # JSON string storing user_id -> option_index
    is_active = Column(Boolean, default=True)
    created_at = Column(DateTime, default=datetime.utcnow, index=True)
    expires_at = Column(DateTime)

# Database initialization
engine = create_engine(Config.DATABASE_URL, echo=False)
SessionLocal = sessionmaker(bind=engine)

def init_db():
    """Initialize database tables"""
    Base.metadata.create_all(engine)

def get_db():
    """Get database session"""
    db = SessionLocal()
    try:
        return db
    finally:
        pass  # Don't close here, let caller manage

122 lines•4.4 KB
python
FEATURES.md
Raw Download

FEATURES.md

# Slack Bot Assistant - Feature List

## 🎯 Core Features

### 1. AI-Powered Assistance
- **Adaptive Personalities**: 5 personality modes (Professional, Casual, Technical, Friendly, Formal)
- **Multi-language Support**: 5 languages (English, Hindi, Spanish, French, German)
- **Sentiment Analysis**: VADER-powered sentiment detection (POSITIVE, NEGATIVE, NEUTRAL, URGENT)
- **Context-Aware Responses**: Intelligent responses based on user queries

### 2. Task Management
- **Create Tasks**: Full task creation with title, description, priority, and due dates
- **Task Listing**: View and filter tasks by status
- **Priority Levels**: Low, Medium, High, Urgent
- **Status Tracking**: Pending, In Progress, Completed, Cancelled
- **Due Date Management**: Flexible date parsing (relative and absolute)

### 3. Productivity Tools
- **Smart Reminders**: Natural language time parsing
- Supports: "in 2 hours", "tomorrow 10am", ISO dates
- **Meeting Summaries**: AI-powered summaries from channel conversations
- **Standup Templates**: Quick daily standup format generation
- **Notes**: Quick note-taking with database storage

### 4. Team Collaboration
- **Channel Analytics**: Comprehensive channel health reports
- **Polls**: Interactive polls for team decisions
- **Meeting Intelligence**: Automatic meeting summarization
- **Channel Management**: Advanced channel analytics and reporting

### 5. Utilities
- **Weather**: OpenWeatherMap API integration
- **Translation**: Multi-language text translation (expandable)
- **Quotes**: Random motivational quotes
- **Random**: Number generation and choice picker

## 🛠️ Technical Features

### Database Integration
- **SQLAlchemy ORM**: Flexible database backend
- **SQLite Default**: Easy local development
- **PostgreSQL/MySQL Ready**: Production-ready database support
- **7 Database Models**: UserConfig, Reminder, Task, MeetingSummary, MessageSentiment, CommandHistory, Poll

### Analytics & Tracking
- **Command Analytics**: Usage statistics and patterns
- **Sentiment Tracking**: Historical sentiment data
- **User Preferences**: Persistent user settings
- **Real-time Dashboard**: Live metrics and visualizations

### Configuration
- **Environment Variables**: Secure configuration management
- **Feature Flags**: Enable/disable features easily
- **Centralized Config**: Single configuration file
- **Flexible Settings**: Customizable limits and parameters

### Error Handling & Logging
- **Comprehensive Logging**: File and console logging
- **Global Error Handlers**: Better error management
- **Graceful Degradation**: Falls back when services unavailable
- **Debugging Support**: Detailed error messages

## 📊 Dashboard Features

### Statistics
- Total Automations
- Average Response Time
- Active Users
- Tasks Completed
- Reminders Sent
- System Uptime

### Visualizations
- Automation Trends (Line Chart)
- Sentiment Distribution (Doughnut Chart)
- Command Usage (Bar Chart)
- Channel Activity Heatmap
- Task Management Interface
- Real-time Bot Logs

### Interactive Elements
- Filterable Task Lists
- Refresh Functionality
- Dynamic Chart Updates
- Real-time Log Streaming
- Responsive Design

## 🔌 Integration Points

### External APIs
- **OpenWeatherMap**: Weather data
- **Google Translate**: Translation services (optional)
- **Slack API**: Full Slack integration

### Extensibility
- **Plugin Architecture**: Easy to add new commands
- **Modular Design**: Clean separation of concerns
- **API Ready**: REST API endpoints can be added
- **Webhook Support**: Ready for webhook integration

## 🚀 Advanced Features

### Scheduling
- **Background Tasks**: Threaded reminder checking
- **Recurring Tasks**: Daily, hourly, weekly scheduling
- **Task Scheduler**: Advanced scheduling system
- **Automatic Execution**: Background task execution

### Data Management
- **Data Persistence**: All data saved to database
- **Data Retention**: Configurable retention policies
- **Data Export**: Ready for data export functionality
- **Backup Support**: Database backup ready

### Security
- **Environment Variables**: Secure credential storage
- **Token Management**: Secure token handling
- **Input Validation**: Input sanitization
- **Error Sanitization**: Secure error messages

## 📈 Performance

- **Fast Response Times**: Optimized code paths
- **Efficient Database Queries**: Optimized SQL queries
- **Background Processing**: Non-blocking operations
- **Caching Ready**: Cache-friendly architecture

## 🔄 Workflow Automation

- **Slash Commands**: 15+ slash commands
- **Global Shortcuts**: Workflow automation triggers
- **Modal Interactions**: Rich user interfaces
- **Event Handlers**: Real-time event processing

---

**Total Features**: 50+ features across 8 categories
**Commands**: 15+ slash commands
**Database Models**: 7 models
**API Integrations**: 3+ integrations ready

For more details, see the [README.md](README.md) and [SETUP.md](SETUP.md) files.

🚀 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