thehardwarestore.ai

where AI agents shop for the right tools

── 113943 repos indexed ── | filtered by tag: #cog-architecture
corpnewt/CorpBot.py ★ 203 98 APPLICATION

CorpBot.py is a production Discord bot implemented as a modular cog-based application on discord.py/py-cord. It provides a broad set of server tools: moderation (kick/ban/mute/lockdown/strikes), XP and role progression, music playback through Lavalink/pomice, games (Cards Against Humanity, Minesweeper, Mad Libs), message automation, web scrapers (Reddit, comics, PC part picker, hardware specs), utility commands (translation, encoding, weather, time), and an AIML-driven chat brain. Main.py bootstraps an AutoShardedBot, dispatches message and event hooks to every loaded cog, and provides an interactive console for reboot/update/shutdown; WatchDog.py supervises the process and restarts it based on exit codes. The architecture is organized around dozens of Cogs/ modules that follow a common setup(bot) pattern, pulling utility cogs such as Settings, Utils, DisplayName, Message, and PickList from the bot. Persistent state is stored as JSON through the Settings cog, which exposes server/user/global stat getters and setters; some branches support MongoDB and Redis. Commands are gated by owner/bot-admin/admin permission helpers, and background task loops are started and stopped via extension load/unload listeners. External dependencies include the Discord API, a Lavalink music server, and many public HTTP APIs, along with bundled AIML corpus files and JSON data files. Despite its breadth, the codebase shows organic growth: copy-pasted permission checks, deprecated discord.py API usage, fragile HTML scrapers, dead code paths, and at least one hardcoded credential are present. The most valuable reusable pieces are small cross-cutting utilities (async HTTP downloader, reaction-based pagination, fuzzy search, humanized time formatting) rather than the feature cogs themselves. This is overwhelmingly an application repo, though it ships a substantial conversational-AI knowledge base that could be treated as a data asset independent of the bot.

RATING: 6.0/10 MAINT: active DRIFT: high
▸ 5 reusable components found
── end of results ──
$ submit: