vimcord 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # vimcord
2
+
3
+ **Vimcord** (pronounced as in _vhem-cord_) is a lightweight, opinionated framework for **Discord.js**. Built for developers who want to reduce the distance between an idea and a working command without fighting with the library.
4
+
5
+ ## 🚀 Installation
6
+
7
+ ```bash
8
+ npm install vimcord discord.js
9
+ # or
10
+ pnpm add vimcord discord.js
11
+ # or
12
+ yarn add vimcord discord.js
13
+ ```
14
+
15
+ ## 🛠 Quick Start
16
+
17
+ Vimcord uses a `createClient` factory to initialize a pre-configured environment with optional feature flags.
18
+
19
+ ```ts
20
+ import { ActivityType, ClientOptions, GatewayIntentBits } from "discord.js";
21
+ import { createClient, GatewayIntentBits, MongoDatabase, StatusType } from "vimcord";
22
+
23
+ const client = createClient(
24
+ {
25
+ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages]
26
+ },
27
+ {
28
+ useGlobalErrorHandlers: true,
29
+ useDefaultSlashCommandHandler: true,
30
+ useDefaultPrefixCommandHandler: true,
31
+ useDefaultContextCommandHandler: true,
32
+
33
+ // Automatically import the .env using dotEnv
34
+ useEnv: true,
35
+
36
+ // Automatically import event and command modules
37
+ importModules: {
38
+ events: "./events",
39
+ slashCommands: "./commands/slash",
40
+ prefixCommands: "./commands/prefix"
41
+ contextCommands: "./commands/context"
42
+ }
43
+ }
44
+ );
45
+
46
+ client.start(async client => {
47
+ // NOTE: This runs *BEFORE* the client logs in
48
+
49
+ // Use Mongo as our database
50
+ await client.useDatabase(new MongoDatabase(client));
51
+ })
52
+ ```
53
+
54
+ ## 🛠 Features
55
+
56
+ - **CommandManager**: Advanced managers for **Slash**, **Prefix**, and **Context** commands. Includes deep inference for permissions and automated error boundaries.
57
+ - **DatabaseManager**: Seamless **MongoDB/Mongoose** integration via `createMongoSchema` and `useMongoDatabase`.
58
+ - **DiscordTools**: High-level interaction helpers including the **Paginator**, **Prompt**, and **BetterModal** for stateful UI.
59
+ - **DiscordUtils**: Essential Discord-first utilities like `dynaSend`, `fetchMember`, and `isMentionOrSnowflake`.
60
+ - **Logger**: A fun, retro style console logger for clear, actionable terminal output.
61
+
62
+ ## 💎 Useful Utilities
63
+
64
+ ### **The BetterEmbed & ACF**
65
+
66
+ Stop writing boilerplate for user mentions and avatars. `BetterEmbed` supports **Shorthand Context Formatting (ACF)**, allowing you to use tokens like `$USER` and `$BOT_AVATAR` directly in strings. Vimcord resolves them at runtime.
67
+
68
+ ### **The Paginator (Chapters & Nested Pages)**
69
+
70
+ Multi-page embeds shouldn't be a chore. The `Paginator` supports **Chapters**, enabling complex, nested page structures with built-in navigation logic and select menu support.
71
+
72
+ ### **The DynaSend: Smart Dispatch**
73
+
74
+ `DynaSend` is an intelligent message delivery system. It automatically detects the interaction state to decide whether to `.reply()`, `.editReply()`, or `.followUp()`. You write one line; Vimcord handles the logic.
75
+
76
+ ### **MongoSchemaBuilder: Resilient DB Ops**
77
+
78
+ The `execute` method on your schemas includes built-in **exponential backoff**. If the database is under load or reconnecting, Vimcord retries the operation instead of crashing your command.
79
+
80
+ ## 👀 Mentionables
81
+
82
+ - **Strictly Typed**: Full TypeScript support with deep inference for command permissions, events, and database documents.
83
+ - **Feature-Rich**: Includes a built-in CLI, automated status rotation, and sophisticated error boundaries.
84
+ - **Developer-Centric**: Focused on performance and ergonomics.
85
+
86
+ ## 👋 About
87
+
88
+ _Vimcord was created by **xsqu1znt**,_ and designed for developers who value performance and aesthetic code.
89
+
90
+ It also takes advantage of my lightweight library [qznt](https://github.com/xsqu1znt/qznt) for a smooth experience.
91
+
92
+ ## **_Vimcord is still a work in progress. If you find any bugs, please let me know._**
93
+
94
+ License: MIT