create-reciple 9.0.0-dev.8 → 9.0.1
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 +46 -46
- package/assets/README.md +29 -190
- package/dist/utils/addons.js +2 -4
- package/dist/utils/addons.js.map +1 -1
- package/package.json +5 -5
- package/templates/javascript/modules/example.js +48 -47
- package/templates/javascript/package.json +17 -17
- package/templates/javascript/template.json +3 -3
- package/templates/typescript/package.json +21 -21
- package/templates/typescript/src/example.ts +44 -44
- package/templates/typescript/template.json +3 -3
package/README.md
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
<h1 align="center">
|
|
2
|
-
<img src="https://i.imgur.com/
|
|
3
|
-
<br>
|
|
4
|
-
</h1>
|
|
5
|
-
|
|
6
|
-
<h3 align="center">
|
|
7
|
-
<a href="https://discord.
|
|
8
|
-
<img src="https://img.shields.io/discord/1032785824686817291?color=5865F2&logo=discord&logoColor=white">
|
|
9
|
-
</a>
|
|
10
|
-
<a href="https://npmjs.org/package/create-reciple">
|
|
11
|
-
<img src="https://img.shields.io/npm/v/create-reciple?label=npm">
|
|
12
|
-
</a>
|
|
13
|
-
<a href="https://github.com/thenorthsolution/Reciple/tree/main/packages/create-reciple">
|
|
14
|
-
<img src="https://img.shields.io/npm/dt/create-reciple?maxAge=3600">
|
|
15
|
-
</a>
|
|
16
|
-
<a href="https://www.codefactor.io/repository/github/
|
|
17
|
-
<img src="https://www.codefactor.io/repository/github/
|
|
18
|
-
</a>
|
|
19
|
-
<br>
|
|
20
|
-
<div style="padding-top: 1rem">
|
|
21
|
-
<a href="https://discord.
|
|
22
|
-
<img src="
|
|
23
|
-
</a>
|
|
24
|
-
</div>
|
|
25
|
-
</h3>
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## About
|
|
30
|
-
|
|
31
|
-
`create-reciple` is a tool used to easily create Reciple projects.
|
|
32
|
-
|
|
33
|
-
## Installation
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm create reciple@latest
|
|
37
|
-
yarn create reciple@latest
|
|
38
|
-
pnpm create reciple@latest
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Templates
|
|
42
|
-
- Javascript (CommonJS)
|
|
43
|
-
- Javascript (ES Modules)
|
|
44
|
-
- Typescript (CommonJS)
|
|
45
|
-
- Typescript (ES Modules)
|
|
46
|
-
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<img src="https://i.imgur.com/h0ljJR5.png" width="50%">
|
|
3
|
+
<br>
|
|
4
|
+
</h1>
|
|
5
|
+
|
|
6
|
+
<h3 align="center">
|
|
7
|
+
<a href="https://discord.gg/thenorthsolution">
|
|
8
|
+
<img src="https://img.shields.io/discord/1032785824686817291?color=5865F2&logo=discord&logoColor=white">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://npmjs.org/package/create-reciple">
|
|
11
|
+
<img src="https://img.shields.io/npm/v/create-reciple?label=npm">
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://github.com/thenorthsolution/Reciple/tree/main/packages/create-reciple">
|
|
14
|
+
<img src="https://img.shields.io/npm/dt/create-reciple?maxAge=3600">
|
|
15
|
+
</a>
|
|
16
|
+
<a href="https://www.codefactor.io/repository/github/thenorthsolution/reciple">
|
|
17
|
+
<img src="https://www.codefactor.io/repository/github/thenorthsolution/reciple/badge">
|
|
18
|
+
</a>
|
|
19
|
+
<br>
|
|
20
|
+
<div style="padding-top: 1rem">
|
|
21
|
+
<a href="https://discord.gg/thenorthsolution">
|
|
22
|
+
<img src="http://invidget.switchblade.xyz/thenorthsolution">
|
|
23
|
+
</a>
|
|
24
|
+
</div>
|
|
25
|
+
</h3>
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## About
|
|
30
|
+
|
|
31
|
+
`create-reciple` is a tool used to easily create Reciple projects.
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm create reciple@latest
|
|
37
|
+
yarn create reciple@latest
|
|
38
|
+
pnpm create reciple@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Templates
|
|
42
|
+
- Javascript (CommonJS)
|
|
43
|
+
- Javascript (ES Modules)
|
|
44
|
+
- Typescript (CommonJS)
|
|
45
|
+
- Typescript (ES Modules)
|
|
46
|
+
|
package/assets/README.md
CHANGED
|
@@ -1,190 +1,29 @@
|
|
|
1
|
-
# Reciple App
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
> Folder structure
|
|
35
|
-
|
|
36
|
-
reciple.mjs
|
|
37
|
-
package.json
|
|
38
|
-
node_modules/
|
|
39
|
-
modules/
|
|
40
|
-
├─ module1.js
|
|
41
|
-
├─ module2.js
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
You can also use a glob pattern for your dir config.
|
|
45
|
-
|
|
46
|
-
```js
|
|
47
|
-
// Module config (reciple.mjs)
|
|
48
|
-
export const config = {
|
|
49
|
-
// other things
|
|
50
|
-
modules: {
|
|
51
|
-
dirs: ['./modules/**/*'], // scans the modules folder and every folders in it recursively
|
|
52
|
-
exclude: [],
|
|
53
|
-
filter: file => true,
|
|
54
|
-
disableModuleVersionCheck: false
|
|
55
|
-
},
|
|
56
|
-
// other things
|
|
57
|
-
};
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
> Folder structure
|
|
62
|
-
|
|
63
|
-
reciple.mjs
|
|
64
|
-
package.json
|
|
65
|
-
node_modules/
|
|
66
|
-
modules/
|
|
67
|
-
├─ module1.js
|
|
68
|
-
├─ module2.js
|
|
69
|
-
├─anotherFolder/
|
|
70
|
-
├─ module1.js
|
|
71
|
-
├─ module2.js
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Module Structure
|
|
75
|
-
|
|
76
|
-
Reciple can load CommonJs and ESM modules at the same time.
|
|
77
|
-
|
|
78
|
-
#### Valid File Types
|
|
79
|
-
- `.js`
|
|
80
|
-
- `.cjs`
|
|
81
|
-
- `.mjs`
|
|
82
|
-
|
|
83
|
-
#### Module Files
|
|
84
|
-
|
|
85
|
-
```js
|
|
86
|
-
// ESM
|
|
87
|
-
export default {
|
|
88
|
-
versions: ['^9'],
|
|
89
|
-
onStart: async ({ client }) => true, // Always return true if the module is loaded
|
|
90
|
-
onLoad: async ({ client }) => {},
|
|
91
|
-
onUnload: async ({ client }) => {}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
// CJS
|
|
95
|
-
module.exports = {
|
|
96
|
-
versions: ['^9'],
|
|
97
|
-
onStart: async ({ client }) => true, // Always return true if the module is loaded
|
|
98
|
-
onLoad: async ({ client }) => {},
|
|
99
|
-
onUnload: async ({ client }) => {}
|
|
100
|
-
};
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Modules Using Classes**
|
|
104
|
-
```js
|
|
105
|
-
|
|
106
|
-
// ESM
|
|
107
|
-
export class MyModule {
|
|
108
|
-
versions = ['^9'];
|
|
109
|
-
|
|
110
|
-
async onStart({ client }) {
|
|
111
|
-
return true; // Always return true if the module is loaded
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
async onLoad({ client }) {}
|
|
115
|
-
async onUnload({ client }) {}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export default new MyModule();
|
|
119
|
-
|
|
120
|
-
// CJS
|
|
121
|
-
class MyModule {
|
|
122
|
-
versions = ['^9'];
|
|
123
|
-
|
|
124
|
-
async onStart({ client }) {
|
|
125
|
-
return true; // Always return true if the module is loaded
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
async onLoad({ client }) {}
|
|
129
|
-
async onUnload({ client }) {}
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
module.exports = new MyModule();
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Adding Commands
|
|
136
|
-
|
|
137
|
-
To add commands to your module, simply add `commands` propery to your module.
|
|
138
|
-
|
|
139
|
-
```js
|
|
140
|
-
export default {
|
|
141
|
-
versions: ['^9'],
|
|
142
|
-
commands: [], // Commands goes here
|
|
143
|
-
onStart: async ({ client }) => true, // Always return true if the module is loaded
|
|
144
|
-
onLoad: async ({ client }) => {},
|
|
145
|
-
onUnload: async ({ client }) => {}
|
|
146
|
-
};
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Instead of importing command builders from Discord.js, use the command builders provided by Reciple.
|
|
150
|
-
|
|
151
|
-
```diff
|
|
152
|
-
// ESM
|
|
153
|
-
- import { ContextMenuCommandBuilder, SlashCommandBuilder } from 'discord.js';
|
|
154
|
-
+ import { ContextMenuCommandBuilder, SlashCommandBuilder } from 'reciple';
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
```diff
|
|
158
|
-
// CJS
|
|
159
|
-
- const { ContextMenuCommandBuilder, SlashCommandBuilder } = require('discord.js');
|
|
160
|
-
+ const { ContextMenuCommandBuilder, SlashCommandBuilder } = require('reciple');
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Just create a new instance of a command builder in the commands array to add commands to a module.
|
|
164
|
-
|
|
165
|
-
```js
|
|
166
|
-
import { ContextMenuCommandBuilder, MessageCommandBuilder, SlashCommandBuilder } from 'reciple';
|
|
167
|
-
|
|
168
|
-
export default {
|
|
169
|
-
versions: ['^9'],
|
|
170
|
-
commands: [
|
|
171
|
-
new ContextMenuCommandBuilder()
|
|
172
|
-
.setName('To Lowercase')
|
|
173
|
-
.setType('Message')
|
|
174
|
-
.setExecute(async ({ interaction }) => interaction.reply(interaction.targetMessage.content.toLowercase())),
|
|
175
|
-
new MessageCommandBuilder()
|
|
176
|
-
.setName('hi')
|
|
177
|
-
.setDescript('Say hello')
|
|
178
|
-
.setExecute(async ({ message }) => message.reply('hello')),
|
|
179
|
-
new SlashCommandBuilder()
|
|
180
|
-
.setName('hello')
|
|
181
|
-
.setDescript('Say hi')
|
|
182
|
-
.setExecute(async ({ interaction }) => interaction.reply('hi'))
|
|
183
|
-
],
|
|
184
|
-
onStart: async ({ client }) => true, // Always return true if the module is loaded
|
|
185
|
-
onLoad: async ({ client }) => {},
|
|
186
|
-
onUnload: async ({ client }) => {}
|
|
187
|
-
};
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
[**Read The Docs**](https://reciple.js.org/docs)
|
|
1
|
+
# Reciple App
|
|
2
|
+
|
|
3
|
+
This project is generated with [`create-reciple`](https://npmjs.org/package/create-reciple)
|
|
4
|
+
|
|
5
|
+
## Developing
|
|
6
|
+
|
|
7
|
+
Set your Discord token in `.env` file located in your bot's root directory.
|
|
8
|
+
|
|
9
|
+
```properties
|
|
10
|
+
# Replace this value to your Discord bot token from https://discord.com/developers/applications
|
|
11
|
+
TOKEN=""
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
To start your bot in watch mode, run:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
npm run dev
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
To start your bot for production your can use `npm run start`.
|
|
21
|
+
|
|
22
|
+
> Note: You need to have Node.js v18+ installed.
|
|
23
|
+
|
|
24
|
+
If your want to learn more, refer to these websites:
|
|
25
|
+
|
|
26
|
+
- [Reciple Guide](https://reciple.js.org/guide)
|
|
27
|
+
- [Reciple Docs](https://reciple.js.org/docs)
|
|
28
|
+
- [Discord.js Docs](https://discord.js.org/#/)
|
|
29
|
+
- [Discord API Docs](https://discord.com/developers/docs)
|
package/dist/utils/addons.js
CHANGED
|
@@ -8,10 +8,8 @@ export const addonCreators = {
|
|
|
8
8
|
'reciple-registry-cache': addRecipleRegistryCache
|
|
9
9
|
};
|
|
10
10
|
export function createAddonModuleFileContent(pkg, imports, classExport, type, params) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
importStatement = `import ${typeof imports === 'string' ? imports : ('{ ' + imports.join(', ') + ' }')} from '${pkg}';`;
|
|
14
|
-
exportStatement = `export default new ${classExport}(${params ?? ''});`;
|
|
11
|
+
const importStatement = `import ${typeof imports === 'string' ? imports : ('{ ' + imports.join(', ') + ' }')} from '${pkg}';`;
|
|
12
|
+
const exportStatement = `export default new ${classExport}(${params ?? ''});`;
|
|
15
13
|
return importStatement + '\n\n' + exportStatement;
|
|
16
14
|
}
|
|
17
15
|
export async function addRecipleInteractionEvents(dir, type) {
|
package/dist/utils/addons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addons.js","sourceRoot":"","sources":["../../src/utils/addons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,4BAA4B,EAAE,2BAA2B;IACzD,mBAAmB,EAAE,mBAAmB;IACxC,sBAAsB,EAAE,qBAAqB;IAC7C,wBAAwB,EAAE,uBAAuB;CACpD,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAAC,GAAW,EAAE,OAAwB,EAAE,WAAmB,EAAE,IAAqB,EAAE,MAAe;IAC3I,
|
|
1
|
+
{"version":3,"file":"addons.js","sourceRoot":"","sources":["../../src/utils/addons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAA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@@
|
|
|
2
2
|
"name": "create-reciple",
|
|
3
3
|
"description": "A Reciple Discord bot project builder",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
|
-
"version": "9.0.
|
|
5
|
+
"version": "9.0.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"module": "./dist/index.js",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@clack/prompts": "^0.7.0",
|
|
38
|
-
"@reciple/utils": "^9.0.
|
|
38
|
+
"@reciple/utils": "^9.0.1",
|
|
39
39
|
"commander": "^12.1.0",
|
|
40
40
|
"fallout-utility": "^2.9.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@reciple/core": "^9.0.
|
|
43
|
+
"@reciple/core": "^9.0.1",
|
|
44
44
|
"@types/node": "^20.12.12",
|
|
45
45
|
"discord.js": "^14.15.2",
|
|
46
46
|
"nodemon": "^3.1.2",
|
|
47
|
-
"reciple": "^9.0.
|
|
47
|
+
"reciple": "^9.0.1",
|
|
48
48
|
"rimraf": "^5.0.7",
|
|
49
49
|
"typescript": "^5.4.5"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "1f1faa3df5ab6616f6af5422f8ea024b7848994c"
|
|
52
52
|
}
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
versions
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
commands
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { SlashCommandBuilder, ContextMenuCommandBuilder, MessageCommandBuilder } from 'reciple';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @type {import('reciple').RecipleModuleData}
|
|
6
|
+
*/
|
|
7
|
+
export default {
|
|
8
|
+
// Supported client versions
|
|
9
|
+
versions: ['^9'],
|
|
10
|
+
|
|
11
|
+
// Module commands
|
|
12
|
+
commands: [
|
|
13
|
+
new ContextMenuCommandBuilder()
|
|
14
|
+
.setName('test')
|
|
15
|
+
.setType('Message')
|
|
16
|
+
.setExecute(async ({ interaction }) => {
|
|
17
|
+
await interaction.reply(`Hello, world!`);
|
|
18
|
+
}),
|
|
19
|
+
new MessageCommandBuilder()
|
|
20
|
+
.setName('test')
|
|
21
|
+
.setDescription('A test command')
|
|
22
|
+
.setExecute(async ({ message }) => {
|
|
23
|
+
await message.reply(`Hello, world!`);
|
|
24
|
+
}),
|
|
25
|
+
new SlashCommandBuilder()
|
|
26
|
+
.setName('test')
|
|
27
|
+
.setDescription('A test command')
|
|
28
|
+
.setExecute(async ({ interaction }) => {
|
|
29
|
+
await interaction.reply(`Hello, world!`);
|
|
30
|
+
})
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
// Executed when module is started (Bot is not logged in)
|
|
34
|
+
onStart: ({ client }) => {
|
|
35
|
+
return true; // Return true when the module is loaded, false if not
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
// Executed when module is loaded (Bot is logged in)
|
|
39
|
+
onLoad: ({ client }) => {
|
|
40
|
+
// Return/throw a string or error on load fail
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// Executed when module is unloaded
|
|
45
|
+
onUnload: ({ client }) => {
|
|
46
|
+
// Return/throw a string or error on unload fail
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "reciple-app",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"start": "reciple -c reciple.mjs",
|
|
7
|
-
"dev": "nodemon --ext js,mjs,json --exec \"reciple -c reciple.mjs\" --signal SIGHUP"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"@reciple/core": "RECIPLE_CORE",
|
|
11
|
-
"discord.js": "DISCORDJS",
|
|
12
|
-
"reciple": "RECIPLE"
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"@types/node": "TYPES_NODE",
|
|
16
|
-
"nodemon": "NODEMON"
|
|
17
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "reciple-app",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "reciple -c reciple.mjs",
|
|
7
|
+
"dev": "nodemon --ext js,mjs,json --exec \"reciple -c reciple.mjs\" --signal SIGHUP"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@reciple/core": "RECIPLE_CORE",
|
|
11
|
+
"discord.js": "DISCORDJS",
|
|
12
|
+
"reciple": "RECIPLE"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/node": "TYPES_NODE",
|
|
16
|
+
"nodemon": "NODEMON"
|
|
17
|
+
}
|
|
18
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Javascript",
|
|
3
|
-
"language": "Javascript"
|
|
1
|
+
{
|
|
2
|
+
"name": "Javascript",
|
|
3
|
+
"language": "Javascript"
|
|
4
4
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "reciple-app",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "rimraf ./modules && tsc",
|
|
7
|
-
"start": "reciple -c reciple.mjs",
|
|
8
|
-
"build:start": "SCRIPT_RUN build && reciple -c reciple.mjs",
|
|
9
|
-
"dev": "nodemon --ext ts,mts,json --ignore ./modules --exec \"SCRIPT_RUN build && reciple -c reciple.mjs\" --signal SIGHUP"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@reciple/core": "RECIPLE_CORE",
|
|
13
|
-
"discord.js": "DISCORDJS",
|
|
14
|
-
"reciple": "RECIPLE"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@types/node": "TYPES_NODE",
|
|
18
|
-
"nodemon": "NODEMON",
|
|
19
|
-
"typescript": "TYPESCRIPT",
|
|
20
|
-
"rimraf": "RIMRAF"
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "reciple-app",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "rimraf ./modules && tsc",
|
|
7
|
+
"start": "reciple -c reciple.mjs",
|
|
8
|
+
"build:start": "SCRIPT_RUN build && reciple -c reciple.mjs",
|
|
9
|
+
"dev": "nodemon --ext ts,mts,json --ignore ./modules --exec \"SCRIPT_RUN build && reciple -c reciple.mjs\" --signal SIGHUP"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@reciple/core": "RECIPLE_CORE",
|
|
13
|
+
"discord.js": "DISCORDJS",
|
|
14
|
+
"reciple": "RECIPLE"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/node": "TYPES_NODE",
|
|
18
|
+
"nodemon": "NODEMON",
|
|
19
|
+
"typescript": "TYPESCRIPT",
|
|
20
|
+
"rimraf": "RIMRAF"
|
|
21
|
+
}
|
|
22
22
|
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { SlashCommandBuilder, ContextMenuCommandBuilder, MessageCommandBuilder, RecipleModuleData } from 'reciple';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
// Supported client versions
|
|
5
|
-
versions: ['^9'],
|
|
6
|
-
|
|
7
|
-
// Module commands
|
|
8
|
-
commands: [
|
|
9
|
-
new ContextMenuCommandBuilder()
|
|
10
|
-
.setName('test')
|
|
11
|
-
.setType('Message')
|
|
12
|
-
.setExecute(async ({ interaction }) => {
|
|
13
|
-
await interaction.reply(`Hello, world!`);
|
|
14
|
-
}),
|
|
15
|
-
new MessageCommandBuilder()
|
|
16
|
-
.setName('test')
|
|
17
|
-
.setDescription('A test command')
|
|
18
|
-
.setExecute(async ({ message }) => {
|
|
19
|
-
await message.reply(`Hello, world!`);
|
|
20
|
-
}),
|
|
21
|
-
new SlashCommandBuilder()
|
|
22
|
-
.setName('test')
|
|
23
|
-
.setDescription('A test command')
|
|
24
|
-
.setExecute(async ({ interaction }) => {
|
|
25
|
-
await interaction.reply(`Hello, world!`);
|
|
26
|
-
})
|
|
27
|
-
],
|
|
28
|
-
|
|
29
|
-
// Executed when module is started (Bot is not logged in)
|
|
30
|
-
onStart: ({ client }) => {
|
|
31
|
-
return true; // Return true when the module is loaded, false if not
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
// Executed when module is loaded (Bot is logged in)
|
|
35
|
-
onLoad: ({ client }) => {
|
|
36
|
-
// Return/throw a string or error on load fail
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// Executed when module is unloaded
|
|
41
|
-
onUnload: ({ client }) => {
|
|
42
|
-
// Return/throw a string or error on unload fail
|
|
43
|
-
}
|
|
44
|
-
} satisfies RecipleModuleData;
|
|
1
|
+
import { SlashCommandBuilder, ContextMenuCommandBuilder, MessageCommandBuilder, RecipleModuleData } from 'reciple';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
// Supported client versions
|
|
5
|
+
versions: ['^9'],
|
|
6
|
+
|
|
7
|
+
// Module commands
|
|
8
|
+
commands: [
|
|
9
|
+
new ContextMenuCommandBuilder()
|
|
10
|
+
.setName('test')
|
|
11
|
+
.setType('Message')
|
|
12
|
+
.setExecute(async ({ interaction }) => {
|
|
13
|
+
await interaction.reply(`Hello, world!`);
|
|
14
|
+
}),
|
|
15
|
+
new MessageCommandBuilder()
|
|
16
|
+
.setName('test')
|
|
17
|
+
.setDescription('A test command')
|
|
18
|
+
.setExecute(async ({ message }) => {
|
|
19
|
+
await message.reply(`Hello, world!`);
|
|
20
|
+
}),
|
|
21
|
+
new SlashCommandBuilder()
|
|
22
|
+
.setName('test')
|
|
23
|
+
.setDescription('A test command')
|
|
24
|
+
.setExecute(async ({ interaction }) => {
|
|
25
|
+
await interaction.reply(`Hello, world!`);
|
|
26
|
+
})
|
|
27
|
+
],
|
|
28
|
+
|
|
29
|
+
// Executed when module is started (Bot is not logged in)
|
|
30
|
+
onStart: ({ client }) => {
|
|
31
|
+
return true; // Return true when the module is loaded, false if not
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
// Executed when module is loaded (Bot is logged in)
|
|
35
|
+
onLoad: ({ client }) => {
|
|
36
|
+
// Return/throw a string or error on load fail
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
// Executed when module is unloaded
|
|
41
|
+
onUnload: ({ client }) => {
|
|
42
|
+
// Return/throw a string or error on unload fail
|
|
43
|
+
}
|
|
44
|
+
} satisfies RecipleModuleData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Typescript",
|
|
3
|
-
"language": "Typescript"
|
|
1
|
+
{
|
|
2
|
+
"name": "Typescript",
|
|
3
|
+
"language": "Typescript"
|
|
4
4
|
}
|