{"id":28160036,"url":"https://github.com/aryprogrammer/expense-tracker-discord-bot","last_synced_at":"2025-05-15T10:13:40.024Z","repository":{"id":291254260,"uuid":"974846372","full_name":"ARYPROGRAMMER/expense-tracker-discord-bot","owner":"ARYPROGRAMMER","description":"A google sheet, discord and gemini combination to help track down your expenses. Funny cause that need expense to happen","archived":false,"fork":false,"pushed_at":"2025-05-03T11:36:11.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-03T12:30:46.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ARYPROGRAMMER.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-29T11:52:43.000Z","updated_at":"2025-05-03T11:36:14.000Z","dependencies_parsed_at":"2025-05-03T12:40:52.749Z","dependency_job_id":null,"html_url":"https://github.com/ARYPROGRAMMER/expense-tracker-discord-bot","commit_stats":null,"previous_names":["aryprogrammer/expense-tracker-discord-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARYPROGRAMMER%2Fexpense-tracker-discord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARYPROGRAMMER%2Fexpense-tracker-discord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARYPROGRAMMER%2Fexpense-tracker-discord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARYPROGRAMMER%2Fexpense-tracker-discord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ARYPROGRAMMER","download_url":"https://codeload.github.com/ARYPROGRAMMER/expense-tracker-discord-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319685,"owners_count":22051076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-15T10:12:20.906Z","updated_at":"2025-05-15T10:13:40.008Z","avatar_url":"https://github.com/ARYPROGRAMMER.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Expense Tracker Bot\n\nA powerful Discord bot that lets you track expenses by sending messages, automatically saves them to a Google Sheet, and provides advanced budget analysis and AI-powered insights.\n\n## Features\n\n- **Easy Expense Tracking**: Message the bot directly or mention it in a server with your expense details\n- **Smart Parsing**: Automatically extracts category, amount, and date information from your messages\n- **Google Sheets Integration**: Automatically saves all expenses to a Google Sheet for permanent record-keeping\n- **Budget Management**: Set and track budgets for different categories with alerts when you're close to limits\n- **Detailed Reports**: Generate comprehensive expense reports and summaries with trend analysis\n- **AI-Powered Insights**: Optional Gemini AI integration for smart categorization, spending analysis, and personalized recommendations\n- **Expense Management**: Edit or delete expenses directly through Discord commands\n- **Duplicate Detection**: Alerts you when you might be recording the same expense twice\n\n## Setup Instructions\n\n### Prerequisites\n\n- Node.js (v14 or higher)\n- A Discord account and bot application\n- A Google account with access to Google Sheets\n- (Optional) Google Gemini API key for AI features\n\n### Quick Setup\n\n1. **Discord Bot Setup**\n\n   - Create a bot in [Discord Developer Portal](https://discord.com/developers/applications)\n   - Enable MESSAGE CONTENT INTENT in the \"Bot\" section\n   - Generate an invite link with the necessary permissions and invite the bot to your server\n\n2. **Google Sheets Setup**\n\n   - Enable Google Sheets API in [Google Cloud Console](https://console.cloud.google.com/)\n   - Create a Service Account and download the credentials JSON file\n   - Create a Google Sheet and share it with the service account email (with edit permissions)\n   - Copy the credentials.json to the config folder of the bot\n\n3. **Configure Environment Variables**\n\n   - Create a `.env` file in the root directory with the following variables:\n\n   ```\n   DISCORD_TOKEN=your_discord_bot_token\n   GOOGLE_SHEET_ID=your_google_sheet_id\n   GOOGLE_APPLICATION_CREDENTIALS=path/to/credentials.json\n   GEMINI_API_KEY=your_gemini_api_key (optional)\n   ```\n\n4. **Install and Run**\n   - Run `npm install` to install dependencies\n   - Run `npm start` to start the bot\n\n## Usage Guide\n\n### Adding Expenses\n\nSimply message the bot directly or mention it in a server with your expense details. The bot understands various formats:\n\n```\n# Basic format: Category Amount\n@ExpenseTracker Groceries $45.50\n@ExpenseTracker Coffee $3.75\n\n# With specific date\n@ExpenseTracker Rent $800 03/05/2025\n@ExpenseTracker Movie Tickets $28.99 04/25/2025\n\n# Just the amount (AI will help categorize if enabled)\n@ExpenseTracker $25.99\n@ExpenseTracker spent $12 at Starbucks\n```\n\n### Command Reference\n\n#### Basic Commands\n\n```\n!help - Show help and list of commands\n!categories - List available expense categories\n!recent [number] - Show your most recent expenses\n```\n\n#### Reporting\n\n```\n!report [days] - Generate expense report for the specified days\n!summary [week|month|year] - Generate a detailed expense summary with trends\n!trends - See spending trends and insights\n```\n\n#### Budget Management\n\n```\n!budget [category] [amount] - Set a budget for a category\n!budget [category] - Check current budget and spending for a category\n!budgets - View all your budgets\n```\n\n#### Expense Management\n\n```\n!edit [category] [amount] [date?] - Edit an existing expense\n!delete [category] [amount] [date?] - Delete an expense\n```\n\n### Examples\n\n```\n!report 7 - Report for last 7 days\n!budget Groceries 200 - Set grocery budget to $200\n!budget Entertainment - Check current entertainment budget\n!summary week - Weekly expense summary with analysis\n!recent 3 - Show 3 most recent expenses\n!edit Food 12.99 - Start the process to edit a Food expense of $12.99\n```\n\n## AI-powered Features\n\nWhen Gemini AI integration is enabled (by providing a valid GEMINI_API_KEY), the bot gains several advanced features:\n\n- **Smart Categorization**: Automatically categorizes expenses when you don't specify a category\n- **Enhanced Descriptions**: Enriches expense descriptions with additional context\n- **Spending Analysis**: Provides insights about spending patterns and anomalies\n- **Budget Recommendations**: Offers personalized suggestions to help you stay within budget\n- **Duplicate Detection**: Intelligently identifies potential duplicate expenses\n- **Trend Predictions**: Analyzes your spending trends to make useful predictions\n\n## License\n\nMIT License - See LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryprogrammer%2Fexpense-tracker-discord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faryprogrammer%2Fexpense-tracker-discord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryprogrammer%2Fexpense-tracker-discord-bot/lists"}