hackquest logo

TruthSync

TruthSync is a 24/7 Discord bot that fights misinformation using Google's Gemini Grounded Search to verify news and statements in real time.

Videos

Description

🧠 TruthSync – Your Real-Time Fact-Checking Bot for Discord

TruthSync is an AI-powered Discord bot built to combat misinformation and promote truth in digital conversations. Available 24/7, it leverages the cutting-edge capabilities of Google’s Gemini 2.0 Flash model and the Grounded Search Tool to verify the authenticity of any statement shared within a Discord server — all with a simple !check command.

📌 What is TruthSync?

In a world overflowing with information — much of it misleading — TruthSync steps in as a real-time verification agent. It integrates seamlessly into any Discord server and empowers communities to fact-check claims, news, and rumors directly through chat. With natural language processing, source-backed analysis, and instant feedback, it brings the power of AI fact-checking into everyday conversations.


🚀 Key Features

  • 24/7 Intelligent Bot: Always online and ready to process fact-checking requests from users across any Discord server.

  • 🔍 Gemini-Powered Verification: Utilizes Google's Gemini 2.0 Flash model along with the Grounded Search Tool to evaluate the truthfulness of statements using real-time, reliable sources.

  • 💬 Simple Command Syntax: Users can simply type !check <message> and receive instant, AI-analyzed results.

  • 📡 Real-Time Feedback: Responses include whether the statement is true, false, misleading, or inconclusive — with a short explanation for context.

  • 🛠️ Robust Error Handling: Detects invalid tokens, malformed queries, and misuse with clear, user-friendly feedback.

  • 🌐 Scalable & Cross-Platform: Built with future support for WhatsApp, Slack, and multilingual capabilities on the roadmap.

    💡 How It Works

    1. A user types !check <statement> in a Discord channel.

    2. The bot sends the input to the backend.

    3. The backend processes the message through Gemini 2.0 Flash and Google's Grounded Search Tool.

    4. AI cross-references reliable, real-time sources to evaluate the claim.

    5. The bot responds with a verdict (True, False, Misleading, or Inconclusive) and a brief, human-readable explanation.


    🧪 Roadmap / Upcoming Features

    • 🔗 Source Linking – Let users access the original sources behind fact-checks.

    • 🌐 Multilingual Support – Support for multiple languages to broaden accessibility.

    • 📊 Fact-Check Analytics Dashboard – Visualize trends and frequent topics being fact-checked.

    • 🛡️ Misinformation Alerts – Push alerts on trending fake news in real time.

    • 🤖 Cross-Platform Integration – WhatsApp and Slack bot support coming soon.

    • 📰 Live Knowledge Base – Tap into a constantly updating news feed for global events.

    Project Links

Progress During Hackathon

📆 Hackathon Progress – TruthSync (2-Day Timeline) Day 1: Planning, Backend, and Bot Development ⏱ Morning – Ideation & Setup Brainstormed on the theme: Real-time fact-checking in chat platforms. Finalized the name: TruthSync. Decided to use Discord as the first integration point. Chose the tech stack: Frontend: Next.js Backend: Python + Gemini API Development: Firebase Studio Deployment: Vercel (frontend), AWS EC2 (backend) ⚙️ Afternoon – Backend API & Gemini Integration Set up Python environment and basic API structure. Integrated Google Gemini + Grounded Search for accurate fact-checking. Designed the logic to analyze user-provided messages and generate verdicts: True, False, or Needs More Context. Created response templates with simplified explanations. 🤖 Evening – Discord Bot Setup Built the Discord bot using discord.py. Connected bot command !check <message> to trigger Gemini-powered validation. Handled edge cases like missing input, API failures, and ambiguous data. Successfully tested a few messages and received accurate truth assessments. Day 2: Frontend, Deployment, Testing, and Finalization 🖥️ Morning – Frontend Development Built the frontend UI using Next.js. Created a minimal interface to showcase project overview, bot functionality, and usage instructions. 🚀 Afternoon – Deployment & Integration Deployed the frontend on Vercel with a custom domain. Hosted backend on AWS EC2 with open endpoints and CORS setup. Validated full cycle from Discord input → Backend processing → Gemini evaluation → Bot response. ✅ Evening – Testing & Polish Performed extensive tests with true, false, and misleading news samples. Fine-tuned Gemini prompts for better consistency. Updated the README with instructions, usage examples, roadmap, and contribution guide. Final bot invite link generated and shared for Discord integration. Final project link: https://h4b-frontend-nexuscode.vercel.app/

Tech Stack

Next
Python
Firebase Studio
Vercel
AWS
Gemini