create-reciple 7.0.0-dev.14 → 7.0.0-dev.15

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-reciple",
3
3
  "license": "GPL-3.0",
4
- "version": "7.0.0-dev.14",
4
+ "version": "7.0.0-dev.15",
5
5
  "type": "module",
6
6
  "description": "Starter project for Reciple handler",
7
7
  "types": "./bin/bin.d.ts",
@@ -14,6 +14,7 @@
14
14
  "bin",
15
15
  "static",
16
16
  "templates.json",
17
+ "templates",
17
18
  "assets",
18
19
  "README.md"
19
20
  ],
@@ -24,5 +25,5 @@
24
25
  "devDependencies": {
25
26
  "@types/prompts": "^2.4.2"
26
27
  },
27
- "gitHead": "1a69b8835ced23a18de02b66d9186802af2dac96"
28
+ "gitHead": "8d95318efc0873a7b48750d2e6d9da70df7031de"
28
29
  }
@@ -0,0 +1,40 @@
1
+ const { ContextMenuCommandBuilder, MessageCommandBuilder, SlashCommandBuilder } = require('reciple');
2
+ const { ApplicationCommandType } = require('discord.js');
3
+
4
+ /**
5
+ * @type {import('reciple').RecipleModuleScript}
6
+ */
7
+ module.exports = {
8
+ versions: ['^7'], // Module supports reciple client version 7
9
+ commands: [
10
+ // Right click a message to execute command
11
+ new ContextMenuCommandBuilder()
12
+ .setName(`Test Context Menu`)
13
+ .setType(ApplicationCommandType.Message)
14
+ .setExecute(async data => data.interaction.reply(`Hello!`)),
15
+
16
+ // Send !test to execute command
17
+ new MessageCommandBuilder()
18
+ .setName(`test`)
19
+ .setDescription(`Test message command`)
20
+ .setAliases(`t`)
21
+ .setExecute(async data => data.message.reply(`Test message command`)),
22
+
23
+ // Use /test to execute command
24
+ new SlashCommandBuilder()
25
+ .setName(`test`)
26
+ .setDescription(`Test slash command`)
27
+ .setExecute(async data => data.interaction.reply(`Test slash command`))
28
+ ],
29
+
30
+ // Module resolved logic here (Bot not logged in)
31
+ onStart(client) {
32
+ return true;
33
+ },
34
+
35
+ // Module loaded logic here (Bot logged in)
36
+ onLoad(client, module) {},
37
+
38
+ // Unload logic here
39
+ onUnload({ reason, client }) {}
40
+ };
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "reciple-app",
3
+ "private": true,
4
+ "scripts": {
5
+ "start": "npx reciple"
6
+ },
7
+ "dependencies": {
8
+ "discord.js": "^14",
9
+ "reciple": "^7"
10
+ }
11
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "reciple-app",
3
+ "private": true,
4
+ "scripts": {
5
+ "build": "npx rimraf ./modules && npx tsc",
6
+ "start": "npx reciple"
7
+ },
8
+ "dependencies": {
9
+ "discord.js": "^14",
10
+ "reciple": "^7"
11
+ },
12
+ "devDependencies": {
13
+ "typescript": "^4",
14
+ "rimraf": "^4"
15
+ }
16
+ }
@@ -0,0 +1,43 @@
1
+ import { ContextMenuCommandBuilder, MessageCommandBuilder, RecipleModuleScript, SlashCommandBuilder } from 'reciple';
2
+ import { ApplicationCommandType } from 'discord.js';
3
+
4
+ export default {
5
+ versions: ['^7'], // Module supports reciple client version 7
6
+ commands: [
7
+ // Right click a message to execute command
8
+ new ContextMenuCommandBuilder()
9
+ .setName(`Test Context Menu`)
10
+ .setType(ApplicationCommandType.Message)
11
+ .setExecute(async data => {
12
+ await data.interaction.reply(`Hello!`);
13
+ }),
14
+
15
+ // Send !test to execute command
16
+ new MessageCommandBuilder()
17
+ .setName(`test`)
18
+ .setDescription(`Test message command`)
19
+ .setAliases(`t`)
20
+ .setExecute(async data => {
21
+ await data.message.reply(`Test message command`);
22
+ }),
23
+
24
+ // Use /test to execute command
25
+ new SlashCommandBuilder()
26
+ .setName(`test`)
27
+ .setDescription(`Test slash command`)
28
+ .setExecute(async data => {
29
+ await data.interaction.reply(`Test slash command`);
30
+ })
31
+ ],
32
+
33
+ // Module resolved logic here (Bot not logged in)
34
+ onStart(client) {
35
+ return true;
36
+ },
37
+
38
+ // Module loaded logic here (Bot logged in)
39
+ onLoad(client, module_) {},
40
+
41
+ // Unload logic here
42
+ onUnload({ reason, client }) {}
43
+ } satisfies RecipleModuleScript;
@@ -0,0 +1,14 @@
1
+ {
2
+ "include": ["./src/**/*"],
3
+ "compilerOptions": {
4
+ "rootDir": "./src",
5
+ "outDir": "./modules",
6
+ "target": "ES2020",
7
+ "module": "Node16",
8
+ "moduleResolution": "node16",
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "sourceMap": true,
12
+ "strict": true
13
+ }
14
+ }