@mostfeatured/dbi 0.0.4 → 0.0.5

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.
Files changed (102) hide show
  1. package/package.json +3 -2
  2. package/dist/src/DBI.d.ts +0 -78
  3. package/dist/src/DBI.d.ts.map +0 -1
  4. package/dist/src/DBI.js +0 -202
  5. package/dist/src/DBI.js.map +0 -1
  6. package/dist/src/Events.d.ts +0 -29
  7. package/dist/src/Events.d.ts.map +0 -1
  8. package/dist/src/Events.js +0 -51
  9. package/dist/src/Events.js.map +0 -1
  10. package/dist/src/data/eventMap.json +0 -234
  11. package/dist/src/index.d.ts +0 -4
  12. package/dist/src/index.d.ts.map +0 -1
  13. package/dist/src/index.js +0 -11
  14. package/dist/src/index.js.map +0 -1
  15. package/dist/src/methods/hookEventListeners.d.ts +0 -3
  16. package/dist/src/methods/hookEventListeners.d.ts.map +0 -1
  17. package/dist/src/methods/hookEventListeners.js +0 -34
  18. package/dist/src/methods/hookEventListeners.js.map +0 -1
  19. package/dist/src/methods/hookInteractionListeners.d.ts +0 -3
  20. package/dist/src/methods/hookInteractionListeners.d.ts.map +0 -1
  21. package/dist/src/methods/hookInteractionListeners.js +0 -97
  22. package/dist/src/methods/hookInteractionListeners.js.map +0 -1
  23. package/dist/src/methods/publishInteractions.d.ts +0 -4
  24. package/dist/src/methods/publishInteractions.d.ts.map +0 -1
  25. package/dist/src/methods/publishInteractions.js +0 -150
  26. package/dist/src/methods/publishInteractions.js.map +0 -1
  27. package/dist/src/types/Button.d.ts +0 -19
  28. package/dist/src/types/Button.d.ts.map +0 -1
  29. package/dist/src/types/Button.js +0 -27
  30. package/dist/src/types/Button.js.map +0 -1
  31. package/dist/src/types/ChatInput/ChatInput.d.ts +0 -15
  32. package/dist/src/types/ChatInput/ChatInput.d.ts.map +0 -1
  33. package/dist/src/types/ChatInput/ChatInput.js +0 -19
  34. package/dist/src/types/ChatInput/ChatInput.js.map +0 -1
  35. package/dist/src/types/ChatInput/ChatInputOptions.d.ts +0 -153
  36. package/dist/src/types/ChatInput/ChatInputOptions.d.ts.map +0 -1
  37. package/dist/src/types/ChatInput/ChatInputOptions.js +0 -149
  38. package/dist/src/types/ChatInput/ChatInputOptions.js.map +0 -1
  39. package/dist/src/types/Event.d.ts +0 -257
  40. package/dist/src/types/Event.d.ts.map +0 -1
  41. package/dist/src/types/Event.js +0 -21
  42. package/dist/src/types/Event.js.map +0 -1
  43. package/dist/src/types/Interaction.d.ts +0 -34
  44. package/dist/src/types/Interaction.d.ts.map +0 -1
  45. package/dist/src/types/Interaction.js +0 -25
  46. package/dist/src/types/Interaction.js.map +0 -1
  47. package/dist/src/types/Locale.d.ts +0 -19
  48. package/dist/src/types/Locale.d.ts.map +0 -1
  49. package/dist/src/types/Locale.js +0 -31
  50. package/dist/src/types/Locale.js.map +0 -1
  51. package/dist/src/types/MessageContextMenu.d.ts +0 -14
  52. package/dist/src/types/MessageContextMenu.d.ts.map +0 -1
  53. package/dist/src/types/MessageContextMenu.js +0 -17
  54. package/dist/src/types/MessageContextMenu.js.map +0 -1
  55. package/dist/src/types/Modal.d.ts +0 -19
  56. package/dist/src/types/Modal.d.ts.map +0 -1
  57. package/dist/src/types/Modal.js +0 -24
  58. package/dist/src/types/Modal.js.map +0 -1
  59. package/dist/src/types/SelectMenu.d.ts +0 -19
  60. package/dist/src/types/SelectMenu.d.ts.map +0 -1
  61. package/dist/src/types/SelectMenu.js +0 -27
  62. package/dist/src/types/SelectMenu.js.map +0 -1
  63. package/dist/src/types/UserContextMenu.d.ts +0 -14
  64. package/dist/src/types/UserContextMenu.d.ts.map +0 -1
  65. package/dist/src/types/UserContextMenu.js +0 -17
  66. package/dist/src/types/UserContextMenu.js.map +0 -1
  67. package/dist/src/utils/MemoryStore.d.ts +0 -9
  68. package/dist/src/utils/MemoryStore.d.ts.map +0 -1
  69. package/dist/src/utils/MemoryStore.js +0 -30
  70. package/dist/src/utils/MemoryStore.js.map +0 -1
  71. package/dist/src/utils/customId.d.ts +0 -7
  72. package/dist/src/utils/customId.d.ts.map +0 -1
  73. package/dist/src/utils/customId.js +0 -44
  74. package/dist/src/utils/customId.js.map +0 -1
  75. package/dist/src/utils/permissions.d.ts +0 -3
  76. package/dist/src/utils/permissions.d.ts.map +0 -1
  77. package/dist/src/utils/permissions.js +0 -9
  78. package/dist/src/utils/permissions.js.map +0 -1
  79. package/dist/src/utils/recursiveImport.d.ts +0 -2
  80. package/dist/src/utils/recursiveImport.d.ts.map +0 -1
  81. package/dist/src/utils/recursiveImport.js +0 -20
  82. package/dist/src/utils/recursiveImport.js.map +0 -1
  83. package/dist/test/commands/hello world.d.ts +0 -2
  84. package/dist/test/commands/hello world.d.ts.map +0 -1
  85. package/dist/test/commands/hello world.js +0 -46
  86. package/dist/test/commands/hello world.js.map +0 -1
  87. package/dist/test/commands/stuff.d.ts +0 -2
  88. package/dist/test/commands/stuff.d.ts.map +0 -1
  89. package/dist/test/commands/stuff.js +0 -22
  90. package/dist/test/commands/stuff.js.map +0 -1
  91. package/dist/test/index.d.ts +0 -2
  92. package/dist/test/index.d.ts.map +0 -1
  93. package/dist/test/index.js +0 -33
  94. package/dist/test/index.js.map +0 -1
  95. package/dist/test/publish.d.ts +0 -2
  96. package/dist/test/publish.d.ts.map +0 -1
  97. package/dist/test/publish.js +0 -5
  98. package/dist/test/publish.js.map +0 -1
  99. package/dist/test/things/test.d.ts +0 -2
  100. package/dist/test/things/test.d.ts.map +0 -1
  101. package/dist/test/things/test.js +0 -84
  102. package/dist/test/things/test.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"hello world.js","sourceRoot":"","sources":["../../../test/commands/hello world.ts"],"names":[],"mappings":";;AAAA,2CAAwD;AACxD,0BAAyB;AAGzB,OAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD,MAAM,CAAC;QACL,IAAI,EAAE,SAAS;QACf,SAAS,CA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} from \"discord.js\";\r\nimport { dbi } from \"..\";\r\nimport { DBIButton } from \"../../src/types/Button\";\r\n\r\ndbi.register(({ ChatInput, ChatInputOptions, Button }) => {\r\n Button({\r\n name: \"button1\",\r\n onExecute(ctx) {\r\n ctx.interaction.reply(`Text was: \\`${(ctx.data[0] as any)?.text}\\``);\r\n },\r\n options: {\r\n style: ButtonStyle.Primary,\r\n label: \"WOW\"\r\n }\r\n });\r\n\r\n ChatInput({\r\n name: \"hello world\",\r\n description: \"bruh\",\r\n async onExecute(ctx) {\r\n ctx.interaction.reply({\r\n content: `Hi! \\`${ctx.interaction.options.getString(\"yazı\")}\\``,\r\n components: [\r\n {\r\n type: ComponentType.ActionRow,\r\n components: [\r\n (ctx.dbi.data.interactions.get(\"button1\") as DBIButton).toJSON({ text: ctx.interaction.options.getString(\"yazı\") })\r\n ]\r\n }\r\n ]\r\n });\r\n },\r\n options: [\r\n ChatInputOptions.stringAutocomplete({\r\n name: \"yazı\",\r\n description: \"yazı yazıon\",\r\n minLength: 3,\r\n maxLength: 16,\r\n required: true,\r\n async onComplete(ctx) {\r\n return [{ name: `${ctx.value} yazdın`, value: `${ctx.value}` }]\r\n }\r\n })\r\n ],\r\n });\r\n})"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=stuff.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stuff.d.ts","sourceRoot":"","sources":["../../../test/commands/stuff.ts"],"names":[],"mappings":""}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const __1 = require("..");
4
- __1.dbi.register(({ ChatInput, ChatInputOptions }) => {
5
- ChatInput({
6
- name: "hello world",
7
- description: "bruh",
8
- async onExecute(ctx) {
9
- ctx.interaction.reply({ content: `Hi! \`${ctx.interaction.options.getString("yazı")}\`` });
10
- },
11
- options: [
12
- ChatInputOptions.string({
13
- name: "yazı",
14
- description: "yazı yazıon",
15
- minLength: 3,
16
- maxLength: 16,
17
- required: true
18
- })
19
- ],
20
- });
21
- });
22
- //# sourceMappingURL=stuff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stuff.js","sourceRoot":"","sources":["../../../test/commands/stuff.ts"],"names":[],"mappings":";;AAAA,0BAAyB;AAEzB,OAAG,CAAC,QAAQ,CAAC,CAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC,EAAE,EAAE;IAC7C,SAAS,CAAC;QACR,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,MAAM;QACnB,KAAK,CAAC,SAAS,CAAC,GAAG;YACjB,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAC7F,CAAC;QACD,OAAO,EAAE;YACP,gBAAgB,CAAC,MAAM,CAAC;gBACtB,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,aAAa;gBAC1B,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,EAAE;gBACb,QAAQ,EAAE,IAAI;aACf,CAAC;SACH;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAA","sourcesContent":["import { dbi } from \"..\";\r\n\r\ndbi.register(({ChatInput, ChatInputOptions}) => {\r\n ChatInput({\r\n name: \"hello world\",\r\n description: \"bruh\",\r\n async onExecute(ctx) {\r\n ctx.interaction.reply({ content: `Hi! \\`${ctx.interaction.options.getString(\"yazı\")}\\`` });\r\n },\r\n options: [\r\n ChatInputOptions.string({\r\n name: \"yazı\",\r\n description: \"yazı yazıon\",\r\n minLength: 3,\r\n maxLength: 16,\r\n required: true\r\n })\r\n ],\r\n });\r\n})"]}
@@ -1,2 +0,0 @@
1
- export declare let dbi: import("../src/DBI").DBI;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../test/index.ts"],"names":[],"mappings":"AAGA,eAAO,IAAI,GAAG,0BAcZ,CAAC"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dbi = void 0;
4
- const tslib_1 = require("tslib");
5
- const index_1 = require("../src/index");
6
- const path_1 = tslib_1.__importDefault(require("path"));
7
- exports.dbi = (0, index_1.createDBI)("namespace", {
8
- discord: {
9
- token: "ODI0MjEwMTMyMzUwMDA5MzY2.G8YRue.GPxxFyZTOG0cnijU_O8U9uvBDwf01zuVHBBoKI",
10
- options: {
11
- intents: [
12
- "Guilds",
13
- "MessageContent",
14
- "GuildMessages"
15
- ]
16
- }
17
- },
18
- defaults: {
19
- locale: "tr"
20
- }
21
- });
22
- exports.dbi.events.on("beforeInteraction", (data) => {
23
- console.log("beforeInteraction");
24
- return true;
25
- });
26
- (async () => {
27
- await (0, index_1.recursiveImport)(path_1.default.resolve(__dirname, "./things"));
28
- await exports.dbi.load();
29
- // await dbi.publish("Guild", "817408899904438282");
30
- await exports.dbi.login();
31
- console.log("ok");
32
- })();
33
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../test/index.ts"],"names":[],"mappings":";;;;AAAA,wCAA0D;AAC1D,wDAAwB;AAEb,QAAA,GAAG,GAAG,IAAA,iBAAS,EAAC,WAAW,EAAE;IACtC,OAAO,EAAE;QACP,KAAK,EAAE,wEAAwE;QAC/E,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,QAAQ;gBACR,gBAAgB;gBAChB,eAAe;aAChB;SACF;KACF;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,IAAI;KACb;CACF,CAAC,CAAC;AAEH,WAAG,CAAC,MAAM,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,IAAI,EAAE,EAAE;IAC1C,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACjC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC,CAAC;AAEH,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,IAAA,uBAAe,EAAC,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAE3D,MAAM,WAAG,CAAC,IAAI,EAAE,CAAC;IACjB,oDAAoD;IACpD,MAAM,WAAG,CAAC,KAAK,EAAE,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACpB,CAAC,CAAC,EAAE,CAAC","sourcesContent":["import { createDBI, recursiveImport } from \"../src/index\";\r\nimport path from \"path\";\r\n\r\nexport let dbi = createDBI(\"namespace\", {\r\n discord: {\r\n token: \"ODI0MjEwMTMyMzUwMDA5MzY2.G8YRue.GPxxFyZTOG0cnijU_O8U9uvBDwf01zuVHBBoKI\",\r\n options: {\r\n intents: [\r\n \"Guilds\",\r\n \"MessageContent\",\r\n \"GuildMessages\"\r\n ]\r\n }\r\n },\r\n defaults: {\r\n locale: \"tr\"\r\n }\r\n});\r\n\r\ndbi.events.on(\"beforeInteraction\", (data) => {\r\n console.log(\"beforeInteraction\");\r\n return true;\r\n});\r\n\r\n(async () => {\r\n await recursiveImport(path.resolve(__dirname, \"./things\"));\r\n\r\n await dbi.load();\r\n // await dbi.publish(\"Guild\", \"817408899904438282\");\r\n await dbi.login();\r\n console.log(\"ok\"); \r\n})();\r\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=publish.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../test/publish.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const _1 = require(".");
4
- _1.dbi.publish("Guild", "");
5
- //# sourceMappingURL=publish.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../test/publish.ts"],"names":[],"mappings":";;AAAA,wBAAwB;AAExB,MAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC","sourcesContent":["import { dbi } from \".\";\r\n\r\ndbi.publish(\"Guild\", \"\");"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../test/things/test.ts"],"names":[],"mappings":""}
@@ -1,84 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const discord_js_1 = require("discord.js");
4
- const __1 = require("..");
5
- __1.dbi.register(({ ChatInput, ChatInputOptions, Button, Event, Modal }) => {
6
- Modal({
7
- name: "modalIsCool",
8
- onExecute(ctx) {
9
- ctx.interaction.reply("xd 1");
10
- },
11
- options: {
12
- title: "XDaaaa",
13
- components: [
14
- {
15
- type: discord_js_1.ComponentType.ActionRow,
16
- components: [
17
- {
18
- customId: "COOLID",
19
- label: "WOWXD",
20
- style: discord_js_1.TextInputStyle.Short,
21
- type: discord_js_1.ComponentType.TextInput,
22
- placeholder: "valla yani"
23
- }
24
- ]
25
- }
26
- ]
27
- }
28
- });
29
- Event({
30
- name: "ready",
31
- onExecute() {
32
- console.log("READY");
33
- }
34
- });
35
- Event({
36
- name: "messageCreate",
37
- onExecute(ctx) {
38
- console.log(ctx.message.content);
39
- }
40
- });
41
- Button({
42
- name: "button1",
43
- onExecute(ctx) {
44
- ctx.interaction.reply(`Text was: \`${ctx.data[0]?.text}\``);
45
- },
46
- options: {
47
- style: discord_js_1.ButtonStyle.Primary,
48
- label: "WOW"
49
- }
50
- });
51
- ChatInput({
52
- name: "hello world",
53
- description: "bruh",
54
- async onExecute(ctx) {
55
- console.log("aa1");
56
- console.log(ctx.dbi.data.interactions.get("modalIsCool").toJSON());
57
- ctx.interaction.showModal(ctx.dbi.data.interactions.get("modalIsCool").toJSON());
58
- // ctx.interaction.reply({
59
- // content: `Hi! \`${ctx.interaction.options.getString("yazı")}\``,
60
- // components: [
61
- // {
62
- // type: ComponentType.ActionRow,
63
- // components: [
64
- // (ctx.dbi.data.interactions.get("button1") as any).toJSON({ text: ctx.interaction.options.getString("yazı") })
65
- // ]
66
- // }
67
- // ]
68
- // });
69
- },
70
- options: [
71
- ChatInputOptions.stringAutocomplete({
72
- name: "yazı",
73
- description: "yazı yazıon",
74
- minLength: 3,
75
- maxLength: 16,
76
- required: true,
77
- async onComplete(ctx) {
78
- return [{ name: `${ctx.value} yazdın`, value: `${ctx.value}` }];
79
- }
80
- })
81
- ],
82
- });
83
- });
84
- //# sourceMappingURL=test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test/things/test.ts"],"names":[],"mappings":";;AAAA,2CAAwE;AACxE,0BAAyB;AAEzB,OAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAErE,KAAK,CAAC;QACJ,IAAI,EAAE,aAAa;QACnB,SAAS,CAAC,GAAG;YACX,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,EAAE;YACP,KAAK,EAAE,QAAQ;YACf,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,0BAAa,CAAC,SAAS;oBAC7B,UAAU,EAAE;wBACV;4BACE,QAAQ,EAAE,QAAQ;4BAClB,KAAK,EAAE,OAAO;4BACd,KAAK,EAAE,2BAAc,CAAC,KAAK;4BAC3B,IAAI,EAAE,0BAAa,CAAC,SAAS;4BAC7B,WAAW,EAAE,YAAY;yBAC1B;qBACF;iBACF;aACF;SACF;KACF,CAAC,CAAA;IAEF,KAAK,CAAC;QACJ,IAAI,EAAE,OAAO;QACb,SAAS;YACP,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC,CAAC;IAEH,KAAK,CAAC;QACJ,IAAI,EAAE,eAAe;QACrB,SAAS,CAAC,GAAG;YACX,O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AAC,KAAK,SAAS,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;gBACjE,CAAC;aACF,CAAC;SACH;KACF,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC","sourcesContent":["import { ButtonStyle, ComponentType, TextInputStyle } from \"discord.js\";\r\nimport { dbi } from \"..\";\r\n\r\ndbi.register(({ ChatInput, ChatInputOptions, Button, Event, Modal }) => {\r\n\r\n Modal({\r\n name: \"modalIsCool\",\r\n onExecute(ctx) {\r\n ctx.interaction.reply(\"xd 1\");\r\n },\r\n options: {\r\n title: \"XDaaaa\",\r\n components: [\r\n {\r\n type: ComponentType.ActionRow,\r\n components: [\r\n {\r\n customId: \"COOLID\",\r\n label: \"WOWXD\",\r\n style: TextInputStyle.Short,\r\n type: ComponentType.TextInput,\r\n placeholder: \"valla yani\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n })\r\n\r\n Event({\r\n name: \"ready\",\r\n onExecute() {\r\n console.log(\"READY\");\r\n }\r\n });\r\n\r\n Event({\r\n name: \"messageCreate\",\r\n onExecute(ctx) {\r\n console.log(ctx.message.content);\r\n }\r\n })\r\n\r\n Button({\r\n name: \"button1\",\r\n onExecute(ctx) {\r\n ctx.interaction.reply(`Text was: \\`${(ctx.data[0] as any)?.text}\\``);\r\n },\r\n options: {\r\n style: ButtonStyle.Primary,\r\n label: \"WOW\"\r\n }\r\n });\r\n\r\n ChatInput({\r\n name: \"hello world\",\r\n description: \"bruh\",\r\n async onExecute(ctx) {\r\n console.log(\"aa1\")\r\n console.log((ctx.dbi.data.interactions.get(\"modalIsCool\") as any).toJSON());\r\n ctx.interaction.showModal((ctx.dbi.data.interactions.get(\"modalIsCool\") as any).toJSON())\r\n // ctx.interaction.reply({\r\n // content: `Hi! \\`${ctx.interaction.options.getString(\"yazı\")}\\``,\r\n // components: [\r\n // {\r\n // type: ComponentType.ActionRow,\r\n // components: [\r\n // (ctx.dbi.data.interactions.get(\"button1\") as any).toJSON({ text: ctx.interaction.options.getString(\"yazı\") })\r\n // ]\r\n // }\r\n // ]\r\n // });\r\n },\r\n options: [\r\n ChatInputOptions.stringAutocomplete({\r\n name: \"yazı\",\r\n description: \"yazı yazıon\",\r\n minLength: 3,\r\n maxLength: 16,\r\n required: true,\r\n async onComplete(ctx) {\r\n return [{ name: `${ctx.value} yazdın`, value: `${ctx.value}` }]\r\n }\r\n })\r\n ],\r\n });\r\n\r\n});"]}