{"id":15212989,"url":"https://github.com/likweitan/discord-bot-a","last_synced_at":"2026-02-10T18:30:59.127Z","repository":{"id":257089104,"uuid":"857296145","full_name":"likweitan/discord-bot-a","owner":"likweitan","description":"A Receipt OCR Discord Bot","archived":false,"fork":false,"pushed_at":"2025-07-22T05:57:17.000Z","size":11203,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T18:40:03.924Z","etag":null,"topics":["discord-bot","discord-js"],"latest_commit_sha":null,"homepage":"https://discord.com/oauth2/authorize?client_id=811109074347360278","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/likweitan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-09-14T09:19:37.000Z","updated_at":"2024-09-14T15:59:18.000Z","dependencies_parsed_at":"2024-09-14T20:08:46.415Z","dependency_job_id":"f755cc5d-9c8c-4fb5-8a24-31255c4c0bc7","html_url":"https://github.com/likweitan/discord-bot-a","commit_stats":null,"previous_names":["likweitan/discord-bot-a"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/likweitan/discord-bot-a","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likweitan%2Fdiscord-bot-a","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likweitan%2Fdiscord-bot-a/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likweitan%2Fdiscord-bot-a/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likweitan%2Fdiscord-bot-a/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/likweitan","download_url":"https://codeload.github.com/likweitan/discord-bot-a/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likweitan%2Fdiscord-bot-a/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29311057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["discord-bot","discord-js"],"created_at":"2024-09-28T09:08:11.405Z","updated_at":"2026-02-10T18:30:59.099Z","avatar_url":"https://github.com/likweitan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Receipt OCR Discord Bot\n\nThis is a Discord bot that extracts information from images of receipts using Optical Character Recognition (OCR). The bot currently supports extracting item names, prices, and quantities from receipts of the following merchants:\n- AEON\n- LOTUS'S\n\n## Features\n- Extracts item details from receipt images.\n- Supports multiline item names and special formats (e.g., reduced prices).\n- Handles different receipt formats for supported merchants.\n- Processes receipts sent in Discord messages and replies with extracted details.\n\n## Technologies Used\n- Node.js: Backend runtime for the bot.\n- Tesseract.js: JavaScript library for OCR processing.\n- Discord.js: API to interact with Discord and handle bot functionalities.\n\n## How It Works\n1. The bot listens for image attachments in messages on Discord.\n2. When an image of a receipt is sent, the bot downloads it and assigns a unique ID.\n3. The bot uses Tesseract.js to process the image and extract text.\n4. It parses the text to identify item names, prices, and quantities, taking into account special formatting rules for different merchants.\n5. The bot sends a message back to the user with the extracted information.\n\n## Supported Merchants\n- AEON\n- LOTUS'S (supports reduced prices and multiline item names).\n\n## Usage\n1. Invite the bot to your Discord server.\n2. Send a message with an attached image of a receipt.\n3. The bot will reply with the extracted details.\n\n## Example\nA receipt from LOTUS'S might be formatted like this:\n\n```\n09555663103205 LOTUSS TAT PAK CHOY\nREDUCED PRICE 1.94\n09556535537708 FIGO P.BUN 3.99\n```\n\n```yaml\nItem: LOTUSS TAT PAK CHOY\nPrice: 1.94 (Reduced)\n---\nItem: FIGO P.BUN\nPrice: 3.99\n```\n\n## Setup\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/receipt-ocr-discord-bot.git\ncd receipt-ocr-discord-bot\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Create a `.env` file with your Discord bot token:\n```bash\nDISCORD_TOKEN=your_discord_bot_token\n```\n\n4. Run the bot:\n```bash\nnode index.js\n```\n\n## Future Improvements\n- Add support for more merchants.\n- Improve parsing logic to handle more complex receipt formats.\n- Add additional item categories (e.g., discounts, taxes).\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request if you'd like to contribute to the project.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikweitan%2Fdiscord-bot-a","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flikweitan%2Fdiscord-bot-a","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikweitan%2Fdiscord-bot-a/lists"}