@spatulox/simplediscordbot 1.0.11 → 1.0.13
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 -2
- package/dist/bot/Bot.d.ts +4 -2
- package/dist/bot/Bot.d.ts.map +1 -1
- package/dist/bot/Bot.js +4 -1
- package/dist/{manager/interactions/InteractionManager.d.ts → bot/BotInteraction.d.ts} +3 -3
- package/dist/bot/BotInteraction.d.ts.map +1 -0
- package/dist/{manager/interactions/InteractionManager.js → bot/BotInteraction.js} +4 -4
- package/dist/bot/BotMessage.d.ts +5 -5
- package/dist/bot/BotMessage.d.ts.map +1 -1
- package/dist/bot/BotMessage.js +4 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/manager/guild/GuildManager.d.ts +1 -1
- package/dist/manager/guild/GuildManager.d.ts.map +1 -1
- package/dist/manager/guild/GuildManager.js +10 -3
- package/dist/manager/guild/GuildUserManager.d.ts +2 -1
- package/dist/manager/guild/GuildUserManager.d.ts.map +1 -1
- package/dist/manager/guild/GuildUserManager.js +23 -0
- package/dist/manager/messages/EmbedManager.d.ts +14 -1
- package/dist/manager/messages/EmbedManager.d.ts.map +1 -1
- package/dist/manager/messages/EmbedManager.js +23 -0
- package/package.json +3 -1
- package/dist/manager/interactions/InteractionManager.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://npmjs.com/package/@spatulox/simplediscordbot)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
-
**Framework Discord.js TypeScript
|
|
8
|
+
**Ultra-simple Framework Discord.js TypeScript**
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
```bash
|
|
@@ -42,4 +42,5 @@ const bot = new Bot(client, config);
|
|
|
42
42
|
bot.client.on(Events.ClientReady, async () => {
|
|
43
43
|
Bot.setRandomActivity(randomActivityList, Time.minute.MIN_10.toMilliseconds());
|
|
44
44
|
console.log("Bot ready! ✨");
|
|
45
|
-
});
|
|
45
|
+
});
|
|
46
|
+
```
|
package/dist/bot/Bot.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Client, ActivityType } from 'discord.js';
|
|
|
2
2
|
import { BotLog, ConfigLog } from "./BotLog";
|
|
3
3
|
import { EmbedColor } from "../manager/messages/EmbedManager";
|
|
4
4
|
import { BotMessage } from "./BotMessage";
|
|
5
|
+
import { BotInteraction } from "./BotInteraction";
|
|
5
6
|
export type BotConfig = {
|
|
6
7
|
botIconUrl?: string;
|
|
7
8
|
defaultEmbedColor?: number | EmbedColor;
|
|
@@ -16,9 +17,10 @@ export type RandomBotActivity = {
|
|
|
16
17
|
message: string;
|
|
17
18
|
}[];
|
|
18
19
|
export declare class Bot {
|
|
19
|
-
static _client: Client;
|
|
20
20
|
static readonly log: typeof BotLog;
|
|
21
|
-
static readonly message: BotMessage;
|
|
21
|
+
static readonly message: typeof BotMessage;
|
|
22
|
+
static readonly interaction: typeof BotInteraction;
|
|
23
|
+
static _client: Client;
|
|
22
24
|
private static criticConfig;
|
|
23
25
|
private static _config;
|
|
24
26
|
get config(): InternalBotConfig;
|
package/dist/bot/Bot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bot.d.ts","sourceRoot":"","sources":["../../src/bot/Bot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAC;AAKjE,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAe,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Bot.d.ts","sourceRoot":"","sources":["../../src/bot/Bot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,YAAY,EAAkB,MAAM,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CAAC,iBAAiB,CAAC,cAAc,EAAE,iBAAiB,EAAE,UAAU,GAAE,MAAM,GAAG,IAAW;CA0B/F"}
|
package/dist/bot/Bot.js
CHANGED
|
@@ -13,6 +13,7 @@ const BotLog_1 = require("./BotLog");
|
|
|
13
13
|
const EmbedManager_1 = require("../manager/messages/EmbedManager");
|
|
14
14
|
const BotMessage_1 = require("./BotMessage");
|
|
15
15
|
const BotEnv_1 = require("./BotEnv");
|
|
16
|
+
const BotInteraction_1 = require("./BotInteraction");
|
|
16
17
|
dotenv_1.default.config();
|
|
17
18
|
class Bot {
|
|
18
19
|
get config() { return Bot._config; }
|
|
@@ -90,5 +91,7 @@ class Bot {
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
exports.Bot = Bot;
|
|
94
|
+
// Static ref
|
|
93
95
|
Bot.log = BotLog_1.BotLog;
|
|
94
|
-
Bot.message =
|
|
96
|
+
Bot.message = BotMessage_1.BotMessage;
|
|
97
|
+
Bot.interaction = BotInteraction_1.BotInteraction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseInteraction, InteractionResponse, Message } from "discord.js";
|
|
2
|
-
import { SendableComponent } from "../builder/SendableComponentBuilder";
|
|
3
|
-
export declare class
|
|
2
|
+
import { SendableComponent } from "../manager/builder/SendableComponentBuilder";
|
|
3
|
+
export declare class BotInteraction {
|
|
4
4
|
/**
|
|
5
5
|
* InteractionReplyOptions && InteractionUpdateOptions
|
|
6
6
|
* The two have "content", "embeds" & "flags" field, so an internal cast is ok, unless discord/discordjs deprecate it
|
|
@@ -14,4 +14,4 @@ export declare class InteractionManager {
|
|
|
14
14
|
static defer(interaction: BaseInteraction): Promise<void>;
|
|
15
15
|
static update(interaction: BaseInteraction, content: string, component: SendableComponent): Promise<void>;
|
|
16
16
|
}
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=BotInteraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const SendableComponentBuilder_1 = require("../builder/SendableComponentBuilder");
|
|
5
|
-
class
|
|
3
|
+
exports.BotInteraction = void 0;
|
|
4
|
+
const SendableComponentBuilder_1 = require("../manager/builder/SendableComponentBuilder");
|
|
5
|
+
class BotInteraction {
|
|
6
6
|
/**
|
|
7
7
|
* InteractionReplyOptions && InteractionUpdateOptions
|
|
8
8
|
* The two have "content", "embeds" & "flags" field, so an internal cast is ok, unless discord/discordjs deprecate it
|
|
@@ -65,4 +65,4 @@ class InteractionManager {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
exports.
|
|
68
|
+
exports.BotInteraction = BotInteraction;
|
package/dist/bot/BotMessage.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ export declare class BotMessage {
|
|
|
4
4
|
/**
|
|
5
5
|
* Send message to any text-based channel
|
|
6
6
|
*/
|
|
7
|
-
send(channel: TextChannel | DMChannel | ThreadChannel | string, content?: string | null, component?: SendableComponent): Promise<Message | boolean>;
|
|
8
|
-
send(channel: TextChannel | DMChannel | ThreadChannel | string, content: MessageCreateOptions): Promise<Message | boolean>;
|
|
9
|
-
sendDM(user: User | GuildMember | string, content?: string, component?: SendableComponent): Promise<Message | boolean>;
|
|
7
|
+
static send(channel: TextChannel | DMChannel | ThreadChannel | string, content?: string | null, component?: SendableComponent): Promise<Message | boolean>;
|
|
8
|
+
static send(channel: TextChannel | DMChannel | ThreadChannel | string, content: MessageCreateOptions): Promise<Message | boolean>;
|
|
9
|
+
static sendDM(user: User | GuildMember | string, content?: string, component?: SendableComponent): Promise<Message | boolean>;
|
|
10
10
|
/**
|
|
11
11
|
* Quick success message
|
|
12
12
|
*/
|
|
13
|
-
success(channel: TextChannel | DMChannel | ThreadChannel | User | GuildMember, message: string): Promise<Message | boolean>;
|
|
13
|
+
static success(channel: TextChannel | DMChannel | ThreadChannel | User | GuildMember, message: string): Promise<Message | boolean>;
|
|
14
14
|
/**
|
|
15
15
|
* Quick error message
|
|
16
16
|
*/
|
|
17
|
-
error(channel: TextChannel | DMChannel | ThreadChannel | User | GuildMember, message: string): Promise<Message | boolean>;
|
|
17
|
+
static error(channel: TextChannel | DMChannel | ThreadChannel | User | GuildMember, message: string): Promise<Message | boolean>;
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=BotMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BotMessage.d.ts","sourceRoot":"","sources":["../../src/bot/BotMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,SAAS,EACT,aAAa,EACb,OAAO,EACP,IAAI,EACJ,WAAW,EAAE,oBAAoB,EACpC,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAC,iBAAiB,EAA2B,MAAM,6CAA6C,CAAC;AAGxG,qBAAa,UAAU;IACnB;;OAEG;
|
|
1
|
+
{"version":3,"file":"BotMessage.d.ts","sourceRoot":"","sources":["../../src/bot/BotMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,SAAS,EACT,aAAa,EACb,OAAO,EACP,IAAI,EACJ,WAAW,EAAE,oBAAoB,EACpC,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAC,iBAAiB,EAA2B,MAAM,6CAA6C,CAAC;AAGxG,qBAAa,UAAU;IACnB;;OAEG;WACU,IAAI,CAAC,OAAO,EAAC,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;WAClJ,IAAI,CAAC,OAAO,EAAC,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;WAmDzH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;IA4BnI;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,GAAG,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;IAQlI;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,GAAG,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;CAOnI"}
|
package/dist/bot/BotMessage.js
CHANGED
|
@@ -7,7 +7,7 @@ const Bot_1 = require("./Bot");
|
|
|
7
7
|
const EmbedManager_1 = require("../manager/messages/EmbedManager");
|
|
8
8
|
const SendableComponentBuilder_1 = require("../manager/builder/SendableComponentBuilder");
|
|
9
9
|
class BotMessage {
|
|
10
|
-
async send(channel, content, component) {
|
|
10
|
+
static async send(channel, content, component) {
|
|
11
11
|
try {
|
|
12
12
|
if (!channel) {
|
|
13
13
|
Log_1.Log.warn('Cannot send message: invalid channel');
|
|
@@ -52,7 +52,7 @@ class BotMessage {
|
|
|
52
52
|
return false;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
async sendDM(user, content, component) {
|
|
55
|
+
static async sendDM(user, content, component) {
|
|
56
56
|
try {
|
|
57
57
|
let targetUser;
|
|
58
58
|
if (user instanceof discord_js_1.User || user instanceof discord_js_1.GuildMember) {
|
|
@@ -84,7 +84,7 @@ class BotMessage {
|
|
|
84
84
|
/**
|
|
85
85
|
* Quick success message
|
|
86
86
|
*/
|
|
87
|
-
success(channel, message) {
|
|
87
|
+
static success(channel, message) {
|
|
88
88
|
const embed = EmbedManager_1.EmbedManager.success(message);
|
|
89
89
|
if (channel instanceof discord_js_1.User || channel instanceof discord_js_1.GuildMember) {
|
|
90
90
|
return this.sendDM(channel, message, embed);
|
|
@@ -94,7 +94,7 @@ class BotMessage {
|
|
|
94
94
|
/**
|
|
95
95
|
* Quick error message
|
|
96
96
|
*/
|
|
97
|
-
error(channel, message) {
|
|
97
|
+
static error(channel, message) {
|
|
98
98
|
const embed = EmbedManager_1.EmbedManager.error(message);
|
|
99
99
|
if (channel instanceof discord_js_1.User || channel instanceof discord_js_1.GuildMember) {
|
|
100
100
|
return this.sendDM(channel, message, embed);
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { GuildManager } from "./manager/guild/GuildManager";
|
|
|
8
8
|
export { UserManager } from './manager/direct/UserManager';
|
|
9
9
|
export { ModalManager } from "./manager/interactions/ModalManager";
|
|
10
10
|
export { SelectMenuManager } from "./manager/interactions/SelectMenuManager";
|
|
11
|
-
export { InteractionManager } from "./manager/interactions/InteractionManager";
|
|
12
11
|
export { Time } from "./utils/times/UnitTime";
|
|
13
12
|
export { Log } from "./utils/Log";
|
|
14
13
|
export { SimpleMutex } from "./utils/SimpleMutex";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAIpC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAI3D,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAIpC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAI3D,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAG7E,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DiscordRegex = exports.SimpleMutex = exports.Log = exports.Time = exports.
|
|
3
|
+
exports.DiscordRegex = exports.SimpleMutex = exports.Log = exports.Time = exports.SelectMenuManager = exports.ModalManager = exports.UserManager = exports.GuildManager = exports.ReactionManager = exports.WebhookManager = exports.EmbedColor = exports.EmbedManager = exports.FileManager = exports.BotEnv = exports.Bot = void 0;
|
|
4
4
|
var Bot_1 = require("./bot/Bot");
|
|
5
5
|
Object.defineProperty(exports, "Bot", { enumerable: true, get: function () { return Bot_1.Bot; } });
|
|
6
6
|
var BotEnv_1 = require("./bot/BotEnv");
|
|
@@ -24,8 +24,6 @@ var ModalManager_1 = require("./manager/interactions/ModalManager");
|
|
|
24
24
|
Object.defineProperty(exports, "ModalManager", { enumerable: true, get: function () { return ModalManager_1.ModalManager; } });
|
|
25
25
|
var SelectMenuManager_1 = require("./manager/interactions/SelectMenuManager");
|
|
26
26
|
Object.defineProperty(exports, "SelectMenuManager", { enumerable: true, get: function () { return SelectMenuManager_1.SelectMenuManager; } });
|
|
27
|
-
var InteractionManager_1 = require("./manager/interactions/InteractionManager");
|
|
28
|
-
Object.defineProperty(exports, "InteractionManager", { enumerable: true, get: function () { return InteractionManager_1.InteractionManager; } });
|
|
29
27
|
// Utils
|
|
30
28
|
var UnitTime_1 = require("./utils/times/UnitTime");
|
|
31
29
|
Object.defineProperty(exports, "Time", { enumerable: true, get: function () { return UnitTime_1.Time; } });
|
|
@@ -24,7 +24,7 @@ export declare class GuildManager {
|
|
|
24
24
|
/**
|
|
25
25
|
* Fetch all members with retry (heavy operation)
|
|
26
26
|
*/
|
|
27
|
-
static fetchAllMembers(guildId: string, MAX_ATTEMPTS?: number, RETRY_DELAY?: number): Promise<Collection<string, GuildMember>>;
|
|
27
|
+
static fetchAllMembers(guildId: string | Guild, MAX_ATTEMPTS?: number, RETRY_DELAY?: number): Promise<Collection<string, GuildMember>>;
|
|
28
28
|
static listban(guildId: string, limit?: number): Promise<GuildBan[]>;
|
|
29
29
|
static moveMember(memberId: string, fromChannelId: string, toChannelId: string): Promise<boolean>;
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuildManager.d.ts","sourceRoot":"","sources":["../../../src/manager/guild/GuildManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,UAAU,EACV,KAAK,EACL,QAAQ,EACoB,OAAO,EACtC,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,YAAY;IAErB,gBAAuB,IAAI,qBAAe;IAC1C,gBAAuB,IAAI,0BAAmB;IAC9C,gBAAuB,OAAO,0BAAqB;IACnD,gBAAuB,MAAM,uBAAiB;IAE9C,MAAM,CAAC,IAAI,IAAI,KAAK,EAAE;IAItB;;OAEG;WACU,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IASvF;;OAEG;WACU,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IASzF;;OAEG;WACU,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQjF;;OAEG;WACU,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,GAAE,MAAU,EAAE,WAAW,GAAE,MAA4C,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"GuildManager.d.ts","sourceRoot":"","sources":["../../../src/manager/guild/GuildManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,UAAU,EACV,KAAK,EACL,QAAQ,EACoB,OAAO,EACtC,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAC,gBAAgB,EAAC,MAAM,oB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nitTime_1.Time.minute.MIN_05.toMilliseconds()) {
|
|
56
|
-
|
|
57
|
-
if (
|
|
58
|
-
|
|
56
|
+
let guild;
|
|
57
|
+
if (guildId instanceof discord_js_1.Guild) {
|
|
58
|
+
guild = guildId;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
let tmp = Bot_1.Bot.client.guilds.cache.get(guildId);
|
|
62
|
+
if (!tmp)
|
|
63
|
+
throw new Error(`Guild ${guildId} not found`);
|
|
64
|
+
guild = tmp;
|
|
65
|
+
}
|
|
59
66
|
for (let attempt = 1; attempt <= MAX_ATTEMPTS; attempt++) {
|
|
60
67
|
try {
|
|
61
68
|
Log_1.Log.info(`UserManager: Fetching ${guild.name} members (attempt ${attempt})`);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UserManager } from "../direct/UserManager";
|
|
2
|
-
import { BanOptions } from "discord.js";
|
|
2
|
+
import { BanOptions, GuildMember } from "discord.js";
|
|
3
3
|
export declare class GuildUserManager extends UserManager {
|
|
4
|
+
static rename(member: GuildMember, nickname: string, maxAttempts?: number): Promise<boolean>;
|
|
4
5
|
/**
|
|
5
6
|
* Check if user is banned from guild
|
|
6
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuildUserManager.d.ts","sourceRoot":"","sources":["../../../src/manager/guild/GuildUserManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"GuildUserManager.d.ts","sourceRoot":"","sources":["../../../src/manager/guild/GuildUserManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAC,UAAU,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAMnD,qBAAa,gBAAiB,SAAQ,WAAW;WAEhC,MAAM,CAAC,MAAM,EAAE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CAAC;IAczF;;OAEG;WACU,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAcvE,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;WAe3E,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CActF"}
|
|
@@ -4,7 +4,30 @@ exports.GuildUserManager = void 0;
|
|
|
4
4
|
const Bot_1 = require("../../bot/Bot");
|
|
5
5
|
const Log_1 = require("../../utils/Log");
|
|
6
6
|
const UserManager_1 = require("../direct/UserManager");
|
|
7
|
+
const promises_1 = require("timers/promises");
|
|
8
|
+
const EmbedManager_1 = require("../messages/EmbedManager");
|
|
9
|
+
const MAX_NICKNAME_LENGTH = 32;
|
|
7
10
|
class GuildUserManager extends UserManager_1.UserManager {
|
|
11
|
+
static async rename(member, nickname, maxAttempts = 3) {
|
|
12
|
+
if (nickname.length > MAX_NICKNAME_LENGTH) {
|
|
13
|
+
nickname = nickname.slice(0, MAX_NICKNAME_LENGTH);
|
|
14
|
+
}
|
|
15
|
+
for (let attempts = 0; attempts < maxAttempts; attempts++) {
|
|
16
|
+
try {
|
|
17
|
+
const oldName = member.displayName;
|
|
18
|
+
await member.setNickname(nickname.trim());
|
|
19
|
+
Log_1.Log.info(`Renaming user: ${oldName} → ${nickname.trim()}`);
|
|
20
|
+
await (0, promises_1.setTimeout)(1500);
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error(`Attempt ${attempts + 1} failed when renaming ${member.displayName} into ${nickname.trim()}:`, error);
|
|
25
|
+
await (0, promises_1.setTimeout)(1000);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
Bot_1.Bot.log.sendLog(EmbedManager_1.EmbedManager.error(`Failed to rename ${member.displayName} to ${nickname.trim()} after ${maxAttempts} attempts.`));
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
8
31
|
/**
|
|
9
32
|
* Check if user is banned from guild
|
|
10
33
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmbedBuilder, InteractionDeferReplyOptions } from "discord.js";
|
|
1
|
+
import { EmbedBuilder, InteractionDeferReplyOptions, InteractionEditReplyOptions, InteractionReplyOptions, MessageCreateOptions } from "discord.js";
|
|
2
2
|
export declare enum EmbedColor {
|
|
3
3
|
error = 8912917,
|
|
4
4
|
success = 65280,
|
|
@@ -72,6 +72,11 @@ export declare class EmbedManager {
|
|
|
72
72
|
* Quick field adder
|
|
73
73
|
*/
|
|
74
74
|
static field(embed: EmbedBuilder, name: string, value: string, inline?: boolean): EmbedBuilder;
|
|
75
|
+
static fields(embed: EmbedBuilder, fields: {
|
|
76
|
+
name: string;
|
|
77
|
+
value: string;
|
|
78
|
+
inline?: boolean;
|
|
79
|
+
}[]): EmbedBuilder;
|
|
75
80
|
/**
|
|
76
81
|
* Fluent API shortcuts
|
|
77
82
|
*/
|
|
@@ -80,5 +85,13 @@ export declare class EmbedManager {
|
|
|
80
85
|
static thumb(embed: EmbedBuilder, url: string): EmbedBuilder;
|
|
81
86
|
static image(embed: EmbedBuilder, url: string): EmbedBuilder;
|
|
82
87
|
static footer(embed: EmbedBuilder, text: string): EmbedBuilder;
|
|
88
|
+
/**
|
|
89
|
+
* Transform embed into objet for interaction.reply()
|
|
90
|
+
*/
|
|
91
|
+
static toInteraction(embed: EmbedBuilder, ephemeral?: boolean): InteractionReplyOptions | InteractionEditReplyOptions;
|
|
92
|
+
/**
|
|
93
|
+
* Transform embed into objet to send a message
|
|
94
|
+
*/
|
|
95
|
+
static toMessage(embed: EmbedBuilder): MessageCreateOptions;
|
|
83
96
|
}
|
|
84
97
|
//# sourceMappingURL=EmbedManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedManager.d.ts","sourceRoot":"","sources":["../../../src/manager/messages/EmbedManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,4BAA4B,
|
|
1
|
+
{"version":3,"file":"EmbedManager.d.ts","sourceRoot":"","sources":["../../../src/manager/messages/EmbedManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,4BAA4B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,oBAAoB,EAE3G,MAAM,YAAY,CAAC;AAGpB,oBAAY,UAAU;IAClB,KAAK,UAAW;IAChB,OAAO,QAAW;IAClB,KAAK,IAAW;IAChB,KAAK,WAAW;IAChB,GAAG,WAAW;IACd,KAAK,QAAW;IAChB,IAAI,MAAW;IACf,MAAM,WAAW;IACjB,IAAI,QAAW;IACf,OAAO,WAAW;IAClB,IAAI,UAAW;IACf,SAAS,WAAW;IACpB,QAAQ,WAAW;IACnB,MAAM,WAAW;IACjB,MAAM,UAAW;IACjB,IAAI,WAAW;IACf,KAAK,WAAW;IAChB,IAAI,QAAW;IACf,IAAI,MAAW;IACf,IAAI,QAAW;IACf,KAAK,UAAW;IAChB,IAAI,WAAW;IACf,MAAM,WAAW;IACjB,KAAK,WAAW;IAChB,MAAM,WAAW;IACjB,KAAK,WAAW;IAChB,IAAI,WAAW;IACf,QAAQ,WAAW;IACnB,KAAK,WAAW;IAChB,IAAI,WAAW;IACf,KAAK,WAAW;IAChB,SAAS,WAAW;IACpB,OAAO,WAAW;IAClB,OAAO,WAAW;IAClB,OAAO,UAAW;IAClB,SAAS,QAAW;CACvB;AAED,qBAAa,YAAY;IACrB,OAAO,CAAC,MAAM,KAAK,QAAQ,GAE1B;IACD,OAAO,CAAC,MAAM,KAAK,aAAa,GAE/B;IAED;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,GAAE,UAAU,GAAG,IAAW,GAAG,YAA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9D;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,GAAE,OAAe,GAAG,uBAAuB,GAAG,2BAA2B;IAO5H;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,oBAAoB;CAK9D"}
|
|
@@ -116,6 +116,12 @@ class EmbedManager {
|
|
|
116
116
|
static field(embed, name, value, inline = false) {
|
|
117
117
|
return embed.addFields({ name, value, inline });
|
|
118
118
|
}
|
|
119
|
+
static fields(embed, fields) {
|
|
120
|
+
fields.forEach((f) => {
|
|
121
|
+
embed.addFields({ name: f.name, value: f.value, inline: f.inline ?? false });
|
|
122
|
+
});
|
|
123
|
+
return embed;
|
|
124
|
+
}
|
|
119
125
|
/**
|
|
120
126
|
* Fluent API shortcuts
|
|
121
127
|
*/
|
|
@@ -134,5 +140,22 @@ class EmbedManager {
|
|
|
134
140
|
static footer(embed, text) {
|
|
135
141
|
return embed.setFooter({ text, iconURL: this.BOT_ICON });
|
|
136
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Transform embed into objet for interaction.reply()
|
|
145
|
+
*/
|
|
146
|
+
static toInteraction(embed, ephemeral = false) {
|
|
147
|
+
return {
|
|
148
|
+
embeds: [embed],
|
|
149
|
+
flags: ephemeral ? [discord_js_1.MessageFlags.Ephemeral] : undefined
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Transform embed into objet to send a message
|
|
154
|
+
*/
|
|
155
|
+
static toMessage(embed) {
|
|
156
|
+
return {
|
|
157
|
+
embeds: [embed]
|
|
158
|
+
};
|
|
159
|
+
}
|
|
137
160
|
}
|
|
138
161
|
exports.EmbedManager = EmbedManager;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spatulox/simplediscordbot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"author": "Spatulox",
|
|
5
5
|
"description": "Simple discord bot framework to set up a bot under 30 secondes",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc",
|
|
13
|
+
"patch": "rm -rf ./dist && npm run build && npm version patch",
|
|
14
|
+
"publish": "npm run patch && npm publish --access public",
|
|
13
15
|
"dev": "nodemon --exec tsx src/test/index.ts"
|
|
14
16
|
},
|
|
15
17
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionManager.d.ts","sourceRoot":"","sources":["../../../src/manager/interactions/InteractionManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACU,mBAAmB,EAClB,OAAO,EACpC,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAC,iBAAiB,EAA2B,MAAM,qCAAqC,CAAC;AAEhG,qBAAa,kBAAkB;IAE3B;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAIhC,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAIjC,OAAO,CAAC,MAAM,CAAC,aAAa;WAIf,IAAI,CACb,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,iBAAiB,EAC5B,SAAS,GAAE,OAAe,GAC3B,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;WAaxD,KAAK,CACd,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,iBAAiB,EAC5B,SAAS,GAAE,OAAe,GAC3B,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;WAIxD,QAAQ,CACjB,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,iBAAiB,EAC5B,SAAS,GAAE,OAAe,GAC3B,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;WAIxD,KAAK,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;WAqBlD,MAAM,CACf,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,iBAAiB,GAC7B,OAAO,CAAC,IAAI,CAAC;CAgBnB"}
|