nexocord 1.0.0
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/LICENCE +21 -0
- package/README.md +144 -0
- package/dist/bin/cli.d.ts +3 -0
- package/dist/bin/cli.d.ts.map +1 -0
- package/dist/bin/cli.js +2739 -0
- package/dist/core/app.d.ts +15 -0
- package/dist/core/app.d.ts.map +1 -0
- package/dist/core/client/ExtendedClient.d.ts +10 -0
- package/dist/core/client/ExtendedClient.d.ts.map +1 -0
- package/dist/core/client/Interactions/autocomplete.d.ts +2 -0
- package/dist/core/client/Interactions/autocomplete.d.ts.map +1 -0
- package/dist/core/client/Interactions/command.d.ts +2 -0
- package/dist/core/client/Interactions/command.d.ts.map +1 -0
- package/dist/core/client/Interactions/index.d.ts +2 -0
- package/dist/core/client/Interactions/index.d.ts.map +1 -0
- package/dist/core/client/Interactions/responder.d.ts +2 -0
- package/dist/core/client/Interactions/responder.d.ts.map +1 -0
- package/dist/core/client/bootstrap.d.ts +18 -0
- package/dist/core/client/bootstrap.d.ts.map +1 -0
- package/dist/core/creators.d.ts +4 -0
- package/dist/core/creators.d.ts.map +1 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/modules/Responders/manager.d.ts +8 -0
- package/dist/core/modules/Responders/manager.d.ts.map +1 -0
- package/dist/core/modules/Responders/route.d.ts +13 -0
- package/dist/core/modules/Responders/route.d.ts.map +1 -0
- package/dist/core/modules/Responders/session.d.ts +9 -0
- package/dist/core/modules/Responders/session.d.ts.map +1 -0
- package/dist/core/modules/commands/handler.d.ts +19 -0
- package/dist/core/modules/commands/handler.d.ts.map +1 -0
- package/dist/core/modules/commands/manager.d.ts +10 -0
- package/dist/core/modules/commands/manager.d.ts.map +1 -0
- package/dist/core/modules/events/handler.d.ts +6 -0
- package/dist/core/modules/events/handler.d.ts.map +1 -0
- package/dist/core/modules/events/manager.d.ts +10 -0
- package/dist/core/modules/events/manager.d.ts.map +1 -0
- package/dist/core/modules/index.d.ts +6 -0
- package/dist/core/modules/index.d.ts.map +1 -0
- package/dist/core/settings.d.ts +7 -0
- package/dist/core/settings.d.ts.map +1 -0
- package/dist/core/types/Command.d.ts +24 -0
- package/dist/core/types/Command.d.ts.map +1 -0
- package/dist/core/types/Context.d.ts +11 -0
- package/dist/core/types/Context.d.ts.map +1 -0
- package/dist/core/types/Event.d.ts +8 -0
- package/dist/core/types/Event.d.ts.map +1 -0
- package/dist/core/types/Responder.d.ts +43 -0
- package/dist/core/types/Responder.d.ts.map +1 -0
- package/dist/core/types/Run.d.ts +8 -0
- package/dist/core/types/Run.d.ts.map +1 -0
- package/dist/core/types/Settings.d.ts +21 -0
- package/dist/core/types/Settings.d.ts.map +1 -0
- package/dist/core/types/Ui.d.ts +93 -0
- package/dist/core/types/Ui.d.ts.map +1 -0
- package/dist/core/types/index.d.ts +7 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/ui/builders.d.ts +87 -0
- package/dist/core/ui/builders.d.ts.map +1 -0
- package/dist/core/ui/index.d.ts +3 -0
- package/dist/core/ui/index.d.ts.map +1 -0
- package/dist/core/ui/normalize.d.ts +17 -0
- package/dist/core/ui/normalize.d.ts.map +1 -0
- package/dist/core/ui/validate.d.ts +14 -0
- package/dist/core/ui/validate.d.ts.map +1 -0
- package/dist/core/utils/Cooldown.d.ts +9 -0
- package/dist/core/utils/Cooldown.d.ts.map +1 -0
- package/dist/core/utils/Logger.d.ts +12 -0
- package/dist/core/utils/Logger.d.ts.map +1 -0
- package/dist/core/utils/Responder.d.ts +6 -0
- package/dist/core/utils/Responder.d.ts.map +1 -0
- package/dist/core/utils/index.d.ts +3 -0
- package/dist/core/utils/index.d.ts.map +1 -0
- package/dist/index.cjs +64987 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64967 -0
- package/package.json +81 -0
- package/tsconfig.json +30 -0
package/LICENCE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mitsuki
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Nexo.js
|
|
2
|
+

|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
Nexo.js é um framework para criação de bots Discord modernos usando TypeScript ou JavaScript, focado em organização, produtividade e escalabilidade desde o primeiro arquivo.
|
|
7
|
+
|
|
8
|
+
## 📚 Documentação
|
|
9
|
+
- Site oficial: https://nexo-js.vercel.app/
|
|
10
|
+
- Repositório: https://github.com/mitsukiie/Nexo.js
|
|
11
|
+
|
|
12
|
+
## ✨ Features
|
|
13
|
+
- ⚡ Setup em segundos
|
|
14
|
+
- 📂 Auto carregamento de comandos e eventos
|
|
15
|
+
- 🧠 API tipada
|
|
16
|
+
- 🧰 CLI integrada
|
|
17
|
+
- 🔄 Compatível com Node.js e Bun
|
|
18
|
+
- 📦 Suporte a ESM e CommonJS
|
|
19
|
+
|
|
20
|
+
## 🤔 Por que usar Nexo.js?
|
|
21
|
+
|
|
22
|
+
Criar bots apenas com discord.js exige estrutura manual,
|
|
23
|
+
carregamento de arquivos e muito boilerplate.
|
|
24
|
+
|
|
25
|
+
O Nexo.js resolve isso oferecendo:
|
|
26
|
+
|
|
27
|
+
- estrutura pronta
|
|
28
|
+
- carregamento automático
|
|
29
|
+
- padrão escalável
|
|
30
|
+
- experiência moderna de desenvolvimento
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## 📦 Instalação
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install @mitsuk/nexo.js discord.js
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Com Bun:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bun add @mitsuk/nexo.js discord.js
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## ⚙️ Configuração
|
|
47
|
+
Crie um arquivo .env:
|
|
48
|
+
```txt
|
|
49
|
+
TOKEN=seu_token_aqui
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## ⚡ Início rápido (JavaScript)
|
|
53
|
+
|
|
54
|
+
Crie um arquivo de entrada (exemplo: `src/index.js`):
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
const { Bootstrap } = require('@mitsuk/nexo.js');
|
|
58
|
+
const { GatewayIntentBits } = require('discord.js');
|
|
59
|
+
|
|
60
|
+
async function main() {
|
|
61
|
+
await Bootstrap.init({
|
|
62
|
+
token: process.env.TOKEN,
|
|
63
|
+
intents: [GatewayIntentBits.Guilds],
|
|
64
|
+
paths: {
|
|
65
|
+
commands: 'src/commands',
|
|
66
|
+
events: 'src/events',
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
main()
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### 📝 Exemplo de comando
|
|
76
|
+
|
|
77
|
+
`src/commands/util/ping.ts`
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
const { createCommand, CommandType } = require('@mitsuk/nexo.js');
|
|
81
|
+
|
|
82
|
+
module.exports = createCommand({
|
|
83
|
+
name: 'ping',
|
|
84
|
+
description: 'Responde com pong!',
|
|
85
|
+
type: CommandType.ChatInput,
|
|
86
|
+
async run(interaction) {
|
|
87
|
+
await interaction.reply({ content: 'Pong!' });
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 📡 Exemplo de evento
|
|
93
|
+
|
|
94
|
+
`src/events/ready.ts`
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
const { createEvent } = require('@mitsuk/nexo.js');
|
|
98
|
+
|
|
99
|
+
module.exports = createEvent({
|
|
100
|
+
name: 'ready',
|
|
101
|
+
once: true,
|
|
102
|
+
run(client) {
|
|
103
|
+
console.log(`Bot ${client.user?.username} está online!`);
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## 🧰 CLI
|
|
109
|
+
O Nexo.js inclui uma CLI própria.
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# desenvolvimento
|
|
113
|
+
npx nexo dev
|
|
114
|
+
|
|
115
|
+
# arquivo customizado
|
|
116
|
+
npx nexo dev src/index.ts
|
|
117
|
+
|
|
118
|
+
# watch mode
|
|
119
|
+
npx nexo dev --watch
|
|
120
|
+
|
|
121
|
+
# produção
|
|
122
|
+
npx nexo start dist/bot.js
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 📂 Estrutura sugerida
|
|
126
|
+
|
|
127
|
+
```txt
|
|
128
|
+
src/
|
|
129
|
+
commands/
|
|
130
|
+
util/
|
|
131
|
+
ping.ts
|
|
132
|
+
events/
|
|
133
|
+
ready.ts
|
|
134
|
+
index.ts
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## 🚧 Status do projeto
|
|
138
|
+
|
|
139
|
+
O Nexo.js está em desenvolvimento ativo.
|
|
140
|
+
Feedbacks e contribuições são bem-vindos!
|
|
141
|
+
|
|
142
|
+
## Licença
|
|
143
|
+
|
|
144
|
+
MIT. Veja o arquivo `LICENSE`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/bin/cli.ts"],"names":[],"mappings":""}
|