@magicyan/discord 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/README.md +3 -0
- package/dist/functions/embeds.js +10 -0
- package/dist/functions/utils.js +16 -0
- package/dist/index.js +19 -0
- package/package.json +29 -0
- package/tsconfig.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEmbedAuthor = void 0;
|
|
4
|
+
function createEmbedAuthor({ user, property = "displayName", imageSize: size = 512, iconURL, url, prefix = "", suffix = "" }) {
|
|
5
|
+
return {
|
|
6
|
+
name: `${prefix}${user[property]}${suffix}`, url,
|
|
7
|
+
iconURL: iconURL || user.displayAvatarURL({ size })
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
exports.createEmbedAuthor = createEmbedAuthor;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLinkButton = exports.createModalInput = exports.createRow = void 0;
|
|
4
|
+
const discord_js_1 = require("discord.js");
|
|
5
|
+
function createRow(...components) {
|
|
6
|
+
return new discord_js_1.ActionRowBuilder({ components });
|
|
7
|
+
}
|
|
8
|
+
exports.createRow = createRow;
|
|
9
|
+
function createModalInput(data) {
|
|
10
|
+
return createRow(new discord_js_1.TextInputBuilder(data));
|
|
11
|
+
}
|
|
12
|
+
exports.createModalInput = createModalInput;
|
|
13
|
+
function createLinkButton(data) {
|
|
14
|
+
return new discord_js_1.ButtonBuilder({ style: discord_js_1.ButtonStyle.Link, ...data });
|
|
15
|
+
}
|
|
16
|
+
exports.createLinkButton = createLinkButton;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./functions/utils"), exports);
|
|
18
|
+
__exportStar(require("./functions/embeds"), exports);
|
|
19
|
+
__exportStar(require("@magicyan/core"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@magicyan/discord",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "ts-node src/index.ts",
|
|
10
|
+
"build": "tsc"
|
|
11
|
+
},
|
|
12
|
+
"types": "./types/index.d.ts",
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"author": "Rincko Dev (https://github.com/rinckodev)",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"ts-node": "^10.9.1",
|
|
18
|
+
"typescript": "^5.2.2"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/rinckodev/magician/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/rinckodev/magician#readme",
|
|
24
|
+
"description": "",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@magicyan/core": "^1.0.3",
|
|
27
|
+
"discord.js": "^14.13.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": ["ESNext"],
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "CommonJS",
|
|
6
|
+
"moduleResolution": "Node",
|
|
7
|
+
"allowSyntheticDefaultImports": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"skipDefaultLibCheck": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"emitDecoratorMetadata": true,
|
|
15
|
+
"experimentalDecorators": true,
|
|
16
|
+
"rootDir": "src",
|
|
17
|
+
"outDir": "dist",
|
|
18
|
+
"declaration": true
|
|
19
|
+
},
|
|
20
|
+
"include": [
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"exclude": ["node_modules"]
|
|
24
|
+
}
|