<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arbab Tahir</title>
    <description>The latest articles on DEV Community by Arbab Tahir (@marbabtahir).</description>
    <link>https://dev.to/marbabtahir</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F744126%2F05761e2f-148e-4e14-b297-63d14dedee74.png</url>
      <title>DEV Community: Arbab Tahir</title>
      <link>https://dev.to/marbabtahir</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marbabtahir"/>
    <language>en</language>
    <item>
      <title>I Built an Open-Source Discord Bot for Developers (Code Analysis, Docs, GitHub Insights)</title>
      <dc:creator>Arbab Tahir</dc:creator>
      <pubDate>Tue, 03 Feb 2026 20:01:02 +0000</pubDate>
      <link>https://dev.to/marbabtahir/i-built-an-open-source-discord-bot-for-developers-code-analysis-docs-github-insights-388k</link>
      <guid>https://dev.to/marbabtahir/i-built-an-open-source-discord-bot-for-developers-code-analysis-docs-github-insights-388k</guid>
      <description>&lt;p&gt;I’ve been working on a Discord bot that developer communities can self-host: it analyzes code, generates docs, explains errors, and even inspects GitHub repos, all via slash commands and powered by OpenAI. I’ve open-sourced it and wanted to share what it does and how it’s built.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;The bot exposes six slash commands. No need for the bot to read every message; everything is interaction-based.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/analyze-code&lt;/code&gt;&lt;/strong&gt; — Paste a code snippet. You get the detected language, potential issues, refactoring ideas, and quality/security notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/generate-docs&lt;/code&gt;&lt;/strong&gt; — Paste code and get generated documentation: what it does, parameters, return values, and usage examples.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/error-explain&lt;/code&gt;&lt;/strong&gt; — Paste an error or stack trace and get a plain-language explanation plus suggested fixes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/explain&lt;/code&gt;&lt;/strong&gt; — Ask for an explanation of a concept (e.g. “async await”) at Beginner, Intermediate, or Senior level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/github-analyze&lt;/code&gt;&lt;/strong&gt; — Pass a public GitHub repo URL. You get a tech stack summary, project structure overview, and improvement suggestions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/project-health&lt;/code&gt;&lt;/strong&gt; — Same repo URL. You get recent commit activity, contributor overview, and a short “health” summary.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;User activity (e.g. which commands are used) is tracked in MongoDB for a simple skill/usage view; the data stays with whoever hosts the bot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Node.js + TypeScript&lt;/strong&gt; — Typed, maintainable code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;discord.js&lt;/strong&gt; — Slash commands and interactions; no privileged intents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI API (gpt-3.5-turbo)&lt;/strong&gt; — All the “understanding” and text generation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB (Mongoose)&lt;/strong&gt; — User and usage data for the scoring idea.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The repo includes setup guides: Discord app configuration, env vars, optional GitHub token for the repo commands, and how to run it locally or in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this structure
&lt;/h2&gt;

&lt;p&gt;I wanted something that’s easy to extend: one place for command definitions, one for handlers, and separate services for GitHub, OpenAI, and user logic. New commands are just a new definition + handler + optional service. There’s an &lt;a href="https://github.com/marbabtahir/discord-developer-assistant/blob/main/docs/ARCHITECTURE.md" rel="noopener noreferrer"&gt;Architecture&lt;/a&gt; doc in the repo for contributors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it or contribute
&lt;/h2&gt;

&lt;p&gt;Everything is on GitHub: &lt;strong&gt;&lt;a href="https://github.com/marbabtahir/discord-developer-assistant" rel="noopener noreferrer"&gt;Discord Developer Assistant&lt;/a&gt;&lt;/strong&gt;. It’s MIT licensed. The README and &lt;code&gt;/docs&lt;/code&gt; folder cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Discord Developer Portal setup (which intents and permissions to enable)&lt;/li&gt;
&lt;li&gt;Optional GitHub token for &lt;code&gt;/github-analyze&lt;/code&gt; and &lt;code&gt;/project-health&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;MongoDB (local or Atlas)&lt;/li&gt;
&lt;li&gt;Build and run commands&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you run a dev community on Discord or just want to tinker with a bot that uses OpenAI and the GitHub API, feel free to clone it, open issues, or send PRs. I’d love to hear what you’d add next.&lt;/p&gt;

</description>
      <category>discord</category>
      <category>typescript</category>
      <category>openai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
