<?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: Yousef-Anwar777</title>
    <description>The latest articles on DEV Community by Yousef-Anwar777 (@yo9sefbest).</description>
    <link>https://dev.to/yo9sefbest</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4281204%2F3df769d6-213e-433a-ad71-c09adb86da02.jpg</url>
      <title>DEV Community: Yousef-Anwar777</title>
      <link>https://dev.to/yo9sefbest</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yo9sefbest"/>
    <language>en</language>
    <item>
      <title>I Built a Self-Hosted JavaScript Discord Bot with SQLite for Small Communities (Moderation, Tickets, Giveaways &amp; Weekly Recaps)</title>
      <dc:creator>Yousef-Anwar777</dc:creator>
      <pubDate>Thu, 03 Dec 2026 18:33:31 +0000</pubDate>
      <link>https://dev.to/yo9sefbest/i-built-a-self-hosted-javascript-discord-bot-with-sqlite-for-small-communities-moderation-37lb</link>
      <guid>https://dev.to/yo9sefbest/i-built-a-self-hosted-javascript-discord-bot-with-sqlite-for-small-communities-moderation-37lb</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/Yo9sefbest/Discord-Novabot" rel="noopener noreferrer"&gt;NovaBot&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Small Discord servers usually face a frustrating choice: install five separate bots that each demand their own dashboard, paywalls, and permission tweaks, or wire together a messy custom script that breaks every single time Discord updates its API.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;NovaBot&lt;/strong&gt; to give small communities a single, &lt;em&gt;self-hosted&lt;/em&gt; JavaScript Discord bot backed by a local SQLite database. No external database server, no bloated SaaS subscriptions, and no complex microservices—just a clean, modular Node.js project you can run locally or in Docker and shape entirely around your server's actual habits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a Local SQLite Bot Fits Small Communities
&lt;/h2&gt;

&lt;p&gt;When you run a bot for a tight-knit group, friend server, or niche community, &lt;em&gt;reliability and simplicity&lt;/em&gt; matter far more than horizontal scaling. A standalone database service adds extra moving parts, unnecessary memory overhead, and another thing you have to worry about backing up.&lt;/p&gt;

&lt;p&gt;Storing state in a local SQLite file keeps everything self-contained:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero database friction:&lt;/strong&gt; Your server settings, warning history, XP progress, giveaways, reminders, and community nominations live in one local file that persists safely across restarts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Straightforward backups:&lt;/strong&gt; Backing up your bot's state is as simple as copying a single database file or mounting a persistent volume in Docker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast local iteration:&lt;/strong&gt; You can test slash commands, button interactions, and scheduled tasks directly on your own machine before rolling updates out to your live community.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What NovaBot Does Out of the Box
&lt;/h2&gt;

&lt;p&gt;Rather than splitting server essentials across multiple third-party bots, NovaBot groups everyday management tools into one cohesive codebase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Moderation &amp;amp; Warnings:&lt;/strong&gt; Handles bans, kicks, timeouts, message clearing, slowmode, channel locks, and warning histories—including an automatic timeout once a member hits your custom warning threshold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lightweight Automod:&lt;/strong&gt; Filters out unwanted Discord invite links and excessive user mentions before they clutter chat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leveling &amp;amp; Role Rewards:&lt;/strong&gt; Tracks chat activity for XP, displays ranks and leaderboards, and automatically grants roles when members reach specific milestones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Support Tickets:&lt;/strong&gt; Spins up private ticket channels via a button click and generates a clean transcript of recent messages sent straight to a log channel when closed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Giveaways &amp;amp; Polls:&lt;/strong&gt; Runs button-based giveaways with multi-winner selection, automated rerolls, and quick reaction polls so members can vote without leaving Discord.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reminders &amp;amp; Starboard:&lt;/strong&gt; Lets users schedule personal reminders and automatically surfaces popular messages in a dedicated starboard channel once they cross your reaction threshold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nova Replay (Weekly Community Recap):&lt;/strong&gt; Empowers members to nominate memorable public messages, vote on favorites, and publish a weekly digest of top-voted moments with links back to the original posts—&lt;em&gt;without&lt;/em&gt; archiving private channels or scraping every chat message indiscriminately.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server Utilities:&lt;/strong&gt; Includes welcome messages, autorole assignment, audit logs, and handy everyday utility commands like &lt;code&gt;/ping&lt;/code&gt;, &lt;code&gt;/avatar&lt;/code&gt;, and &lt;code&gt;/serverinfo&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How the Project Is Structured
&lt;/h2&gt;

&lt;p&gt;One of my main goals with NovaBot was keeping the JavaScript architecture clean, readable, and easy to extend without over-engineering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Entry &amp;amp; Command Registration:&lt;/strong&gt; Dedicated scripts handle bootstrapping the Discord client and syncing slash command definitions with Discord's API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database Layer:&lt;/strong&gt; A central module manages schema setup and helper queries for server settings and community data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature-Grouped Handlers:&lt;/strong&gt; Slash commands, Discord gateway events, and button interactions are organized logically so you can easily trace how a user action flows from a button click to a database update.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared Utilities &amp;amp; Checks:&lt;/strong&gt; Reusable helpers handle tasks like leveling math, reminder delivery, and logging, backed by automated tests and command sanity checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Adding a new slash command is designed to be low-friction: create a command module under the &lt;code&gt;commands&lt;/code&gt; directory with its definition and execution handler, run the command deploy script, and Discord picks up the updated interface instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started Locally or with Docker
&lt;/h2&gt;

&lt;p&gt;If you want to spin up your own instance, the setup workflow is intentionally straightforward:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create the Discord App &amp;amp; Bot:&lt;/strong&gt; Register an application in the &lt;strong&gt;Discord Developer Portal&lt;/strong&gt;, grab your Application ID and bot token, enable the required gateway intents (&lt;em&gt;Server Members Intent&lt;/em&gt; and &lt;em&gt;Message Content Intent&lt;/em&gt;), and invite the bot to a test server with only the permissions it needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install &amp;amp; Configure:&lt;/strong&gt; Install dependencies using Node.js 20, copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt;, and configure your &lt;code&gt;DISCORD_TOKEN&lt;/code&gt;, &lt;code&gt;CLIENT_ID&lt;/code&gt;, and optional &lt;code&gt;GUILD_ID&lt;/code&gt; (which is super handy for near-instant command updates in a test server).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deploy Commands &amp;amp; Run:&lt;/strong&gt; Register your slash commands, start the application, and test basic commands like &lt;code&gt;/ping&lt;/code&gt; or &lt;code&gt;/help&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure Your Server:&lt;/strong&gt; Set up your log, welcome, starboard, and support channels via slash commands, configure auto-mod and level roles, and verify your active settings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you prefer containerized deployments, building the Docker image and attaching a persistent volume to the data directory ensures your SQLite database remains secure across container restarts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Designing for Privacy and Clarity
&lt;/h2&gt;

&lt;p&gt;A small detail I cared deeply about—especially with &lt;strong&gt;Nova Replay&lt;/strong&gt;—is respecting user boundaries. Instead of logging every single message sent in the server by default, Nova Replay &lt;em&gt;only&lt;/em&gt; records explicit nominations and votes from channels visible to the general public, automatically skipping deleted or restricted messages. That keeps the feature fun and community-driven without turning the bot into an invasive chat archive.&lt;/p&gt;




&lt;p&gt;What features do you actually keep turned on in a small Discord server, and which ones end up feeling like noise after a week?&lt;/p&gt;

</description>
      <category>discord</category>
      <category>node</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
