@magicyan/discord 1.0.3 → 1.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.
- package/README.md +1 -1
- package/dist/constants/client.js +42 -0
- package/dist/index.js +1 -0
- package/package.json +7 -5
- package/types/constants/client.d.ts +6 -0
- package/types/functions/embeds.d.ts +10 -0
- package/types/functions/utils.d.ts +4 -0
- package/types/index.d.ts +4 -30
- package/tsconfig.json +0 -23
package/README.md
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomItents = void 0;
|
|
4
|
+
const discord_js_1 = require("discord.js");
|
|
5
|
+
const Messages = [
|
|
6
|
+
discord_js_1.IntentsBitField.Flags.MessageContent,
|
|
7
|
+
discord_js_1.IntentsBitField.Flags.GuildMessages,
|
|
8
|
+
discord_js_1.IntentsBitField.Flags.GuildMessageReactions,
|
|
9
|
+
discord_js_1.IntentsBitField.Flags.GuildMessageTyping,
|
|
10
|
+
discord_js_1.IntentsBitField.Flags.DirectMessages,
|
|
11
|
+
discord_js_1.IntentsBitField.Flags.DirectMessageReactions,
|
|
12
|
+
discord_js_1.IntentsBitField.Flags.DirectMessageTyping,
|
|
13
|
+
];
|
|
14
|
+
const Guild = [
|
|
15
|
+
discord_js_1.IntentsBitField.Flags.GuildEmojisAndStickers,
|
|
16
|
+
discord_js_1.IntentsBitField.Flags.GuildIntegrations,
|
|
17
|
+
discord_js_1.IntentsBitField.Flags.GuildInvites,
|
|
18
|
+
discord_js_1.IntentsBitField.Flags.GuildMembers,
|
|
19
|
+
discord_js_1.IntentsBitField.Flags.GuildMessageReactions,
|
|
20
|
+
discord_js_1.IntentsBitField.Flags.GuildMessageTyping,
|
|
21
|
+
discord_js_1.IntentsBitField.Flags.GuildMessages,
|
|
22
|
+
discord_js_1.IntentsBitField.Flags.GuildModeration,
|
|
23
|
+
discord_js_1.IntentsBitField.Flags.GuildPresences,
|
|
24
|
+
discord_js_1.IntentsBitField.Flags.GuildScheduledEvents,
|
|
25
|
+
discord_js_1.IntentsBitField.Flags.GuildVoiceStates,
|
|
26
|
+
discord_js_1.IntentsBitField.Flags.GuildWebhooks,
|
|
27
|
+
discord_js_1.IntentsBitField.Flags.Guilds,
|
|
28
|
+
];
|
|
29
|
+
const Other = [
|
|
30
|
+
discord_js_1.IntentsBitField.Flags.AutoModerationConfiguration,
|
|
31
|
+
discord_js_1.IntentsBitField.Flags.AutoModerationExecution,
|
|
32
|
+
];
|
|
33
|
+
exports.CustomItents = {
|
|
34
|
+
Messages,
|
|
35
|
+
Guild,
|
|
36
|
+
Other,
|
|
37
|
+
All: [
|
|
38
|
+
...Messages,
|
|
39
|
+
...Guild,
|
|
40
|
+
...Other,
|
|
41
|
+
],
|
|
42
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants/client"), exports);
|
|
17
18
|
__exportStar(require("./functions/utils"), exports);
|
|
18
19
|
__exportStar(require("./functions/embeds"), exports);
|
|
19
20
|
__exportStar(require("@magicyan/core"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magicyan/discord",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
"typescript": "^5.2.2"
|
|
19
19
|
},
|
|
20
20
|
"bugs": {
|
|
21
|
-
"url": "https://github.com/rinckodev/
|
|
21
|
+
"url": "https://github.com/rinckodev/magicyan/issues"
|
|
22
22
|
},
|
|
23
|
-
"homepage": "https://github.com/rinckodev/
|
|
24
|
-
"description": "",
|
|
23
|
+
"homepage": "https://github.com/rinckodev/magicyan/tree/main/packages/discord#readme",
|
|
24
|
+
"description": "imple functions to facilitate discord bot development",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@magicyan/core": "^1.0.
|
|
26
|
+
"@magicyan/core": "^1.0.6"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
27
29
|
"discord.js": "^14.13.0"
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EmbedAuthorData, ImageURLOptions, User } from "discord.js";
|
|
2
|
+
export declare function createEmbedAuthor({ user, property, imageSize: size, iconURL, url, prefix, suffix }: {
|
|
3
|
+
user: User;
|
|
4
|
+
property?: keyof Pick<User, "username" | "displayName" | "id">;
|
|
5
|
+
imageSize?: ImageURLOptions["size"];
|
|
6
|
+
iconURL?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
prefix?: string;
|
|
9
|
+
suffix?: string;
|
|
10
|
+
}): EmbedAuthorData;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ActionRowBuilder, AnyComponentBuilder, ButtonBuilder, LinkButtonComponentData, TextInputBuilder, TextInputComponentData } from "discord.js";
|
|
2
|
+
export declare function createRow<Component extends AnyComponentBuilder>(...components: Component[]): ActionRowBuilder<Component>;
|
|
3
|
+
export declare function createModalInput(data: Omit<TextInputComponentData, "type">): ActionRowBuilder<TextInputBuilder>;
|
|
4
|
+
export declare function createLinkButton(data: Omit<LinkButtonComponentData, "style" | "type">): ButtonBuilder;
|
package/types/index.d.ts
CHANGED
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
ActionRowBuilder,
|
|
6
|
-
AnyComponentBuilder,
|
|
7
|
-
ButtonBuilder,
|
|
8
|
-
LinkButtonComponentData,
|
|
9
|
-
TextInputBuilder,
|
|
10
|
-
TextInputComponentData
|
|
11
|
-
} from "discord.js";
|
|
12
|
-
|
|
13
|
-
export declare function createEmbedAuthor({
|
|
14
|
-
user,property, imageSize: size, iconURL, url, prefix, suffix
|
|
15
|
-
}:{
|
|
16
|
-
user: User;
|
|
17
|
-
property?: keyof Pick<User, "username" | "displayName" | "id">;
|
|
18
|
-
imageSize?: ImageURLOptions["size"];
|
|
19
|
-
iconURL?: string;
|
|
20
|
-
url?: string;
|
|
21
|
-
prefix?: string;
|
|
22
|
-
suffix?: string;
|
|
23
|
-
}): EmbedAuthorData;
|
|
24
|
-
|
|
25
|
-
export declare function createRow<Component extends AnyComponentBuilder = AnyComponentBuilder>(...components: Component[]): ActionRowBuilder<Component>;
|
|
26
|
-
export declare function createModalInput(data: Omit<TextInputComponentData, "type">): ActionRowBuilder<TextInputBuilder>;
|
|
27
|
-
export declare function createLinkButton(data: Omit<LinkButtonComponentData, "style" | "type">): ButtonBuilder;
|
|
28
|
-
|
|
29
|
-
// external
|
|
30
|
-
export * from "@magicyan/core";
|
|
1
|
+
export * from "./constants/client";
|
|
2
|
+
export * from "./functions/utils";
|
|
3
|
+
export * from "./functions/embeds";
|
|
4
|
+
export * from "@magicyan/core";
|
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
},
|
|
19
|
-
"include": [
|
|
20
|
-
"src"
|
|
21
|
-
],
|
|
22
|
-
"exclude": ["node_modules"]
|
|
23
|
-
}
|