@spatulox/simplediscordbot 1.0.36 → 1.0.37
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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +50 -53
- package/dist/index.mjs +6 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -534,7 +534,7 @@ var EmbedManager = class {
|
|
|
534
534
|
* Creates simple embed with just description
|
|
535
535
|
*/
|
|
536
536
|
static simple(description, color = null) {
|
|
537
|
-
return this.create(color).setDescription(description)
|
|
537
|
+
return this.create(color).setDescription(description);
|
|
538
538
|
}
|
|
539
539
|
/**
|
|
540
540
|
* Creates error embed
|
|
@@ -549,10 +549,10 @@ var EmbedManager = class {
|
|
|
549
549
|
return this.create(25600 /* minecraft */).setTitle("Success").setDescription(description);
|
|
550
550
|
}
|
|
551
551
|
/**
|
|
552
|
-
* Creates
|
|
552
|
+
* Creates a simply description embed
|
|
553
553
|
*/
|
|
554
554
|
static description(description) {
|
|
555
|
-
return this.create(
|
|
555
|
+
return this.create().setDescription(description).setFooter(null);
|
|
556
556
|
}
|
|
557
557
|
/**
|
|
558
558
|
* Creates debug embed
|
|
@@ -1270,9 +1270,6 @@ var WebhookManager = class {
|
|
|
1270
1270
|
};
|
|
1271
1271
|
|
|
1272
1272
|
// src/manager/guild/ChannelManager/GuildTextChannelManager.ts
|
|
1273
|
-
var import_discord8 = require("discord.js");
|
|
1274
|
-
|
|
1275
|
-
// src/manager/guild/ChannelManager/GuildChannelManager.ts
|
|
1276
1273
|
var import_discord7 = require("discord.js");
|
|
1277
1274
|
|
|
1278
1275
|
// src/manager/guild/ChannelManager/GuildMessageManager.ts
|
|
@@ -1379,9 +1376,9 @@ var _GuildChannelManager = class _GuildChannelManager {
|
|
|
1379
1376
|
static async find(channelId) {
|
|
1380
1377
|
try {
|
|
1381
1378
|
const cached = Bot.client.channels.cache.get(channelId);
|
|
1382
|
-
if (cached && cached
|
|
1379
|
+
if (cached && !cached.isDMBased()) return cached;
|
|
1383
1380
|
const channel = await Bot.client.channels.fetch(channelId);
|
|
1384
|
-
if (channel && channel
|
|
1381
|
+
if (channel && !channel.isDMBased()) return channel;
|
|
1385
1382
|
Log.warn(`Channel ${channelId} not found in any guild`);
|
|
1386
1383
|
return null;
|
|
1387
1384
|
} catch (error) {
|
|
@@ -1468,12 +1465,12 @@ var GuildTextChannelManager = class extends GuildChannelManager {
|
|
|
1468
1465
|
Log.warn(`Guild ${guildId} not found`);
|
|
1469
1466
|
return [];
|
|
1470
1467
|
}
|
|
1471
|
-
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof
|
|
1468
|
+
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof import_discord7.TextChannel);
|
|
1472
1469
|
}
|
|
1473
1470
|
static async create(guildId, name, options) {
|
|
1474
1471
|
return await super._create(guildId, {
|
|
1475
1472
|
name,
|
|
1476
|
-
type:
|
|
1473
|
+
type: import_discord7.ChannelType.GuildText,
|
|
1477
1474
|
...options
|
|
1478
1475
|
});
|
|
1479
1476
|
}
|
|
@@ -1570,10 +1567,10 @@ var ReactionManager = class {
|
|
|
1570
1567
|
};
|
|
1571
1568
|
|
|
1572
1569
|
// src/manager/guild/GuildManager.ts
|
|
1573
|
-
var
|
|
1570
|
+
var import_discord14 = require("discord.js");
|
|
1574
1571
|
|
|
1575
1572
|
// src/manager/direct/BasicUserManager.ts
|
|
1576
|
-
var
|
|
1573
|
+
var import_discord8 = require("discord.js");
|
|
1577
1574
|
var BasicUserManager = class {
|
|
1578
1575
|
/**
|
|
1579
1576
|
* Find member in specific guild
|
|
@@ -1631,7 +1628,7 @@ var BasicUserManager = class {
|
|
|
1631
1628
|
payload = content_or_component_or_options;
|
|
1632
1629
|
}
|
|
1633
1630
|
const message = await dmChannel.send(payload);
|
|
1634
|
-
if (user instanceof
|
|
1631
|
+
if (user instanceof import_discord8.GuildMember) {
|
|
1635
1632
|
Log.info(`Sent DM to ${user.id} (${user.user.username}): "${(payload.content || "Embed/Component").substring(0, 50)}..."`);
|
|
1636
1633
|
} else {
|
|
1637
1634
|
Log.info(`Sent DM to ${user.id} (${user.username}): "${(payload.content || "Embed/Component").substring(0, 50)}..."`);
|
|
@@ -1645,13 +1642,13 @@ var BasicUserManager = class {
|
|
|
1645
1642
|
};
|
|
1646
1643
|
|
|
1647
1644
|
// src/manager/guild/GuildUserManager.ts
|
|
1648
|
-
var
|
|
1645
|
+
var import_discord9 = require("discord.js");
|
|
1649
1646
|
var import_promises2 = require("timers/promises");
|
|
1650
1647
|
var MAX_NICKNAME_LENGTH = 32;
|
|
1651
1648
|
var GuildUserManager = class extends BasicUserManager {
|
|
1652
1649
|
static async find(userId, guild) {
|
|
1653
1650
|
try {
|
|
1654
|
-
if (guild instanceof
|
|
1651
|
+
if (guild instanceof import_discord9.Guild) {
|
|
1655
1652
|
return await guild.members.fetch(userId);
|
|
1656
1653
|
} else {
|
|
1657
1654
|
return await (await GuildManager.find(guild)).members.fetch(userId);
|
|
@@ -1949,15 +1946,15 @@ var RoleManager = class {
|
|
|
1949
1946
|
};
|
|
1950
1947
|
|
|
1951
1948
|
// src/manager/guild/ChannelManager/ForumChannelManager.ts
|
|
1952
|
-
var
|
|
1949
|
+
var import_discord10 = require("discord.js");
|
|
1953
1950
|
var ForumChannelManager = class extends GuildChannelManager {
|
|
1954
1951
|
static async findInGuild(guildId, channelId) {
|
|
1955
1952
|
const channel = await super.findInGuild(guildId, channelId);
|
|
1956
|
-
return channel instanceof
|
|
1953
|
+
return channel instanceof import_discord10.ForumChannel ? channel : null;
|
|
1957
1954
|
}
|
|
1958
1955
|
static async find(channelId) {
|
|
1959
1956
|
const channel = await super.find(channelId);
|
|
1960
|
-
return channel instanceof
|
|
1957
|
+
return channel instanceof import_discord10.ForumChannel ? channel : null;
|
|
1961
1958
|
}
|
|
1962
1959
|
static findAll(guildId) {
|
|
1963
1960
|
const guild = Bot.client.guilds.cache.get(guildId);
|
|
@@ -1965,27 +1962,27 @@ var ForumChannelManager = class extends GuildChannelManager {
|
|
|
1965
1962
|
Log.warn(`Guild ${guildId} not found`);
|
|
1966
1963
|
return [];
|
|
1967
1964
|
}
|
|
1968
|
-
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof
|
|
1965
|
+
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof import_discord10.ForumChannel);
|
|
1969
1966
|
}
|
|
1970
1967
|
static async create(guildId, name, options) {
|
|
1971
1968
|
return await super._create(guildId, {
|
|
1972
1969
|
name,
|
|
1973
|
-
type:
|
|
1970
|
+
type: import_discord10.ChannelType.GuildForum,
|
|
1974
1971
|
...options
|
|
1975
1972
|
});
|
|
1976
1973
|
}
|
|
1977
1974
|
};
|
|
1978
1975
|
|
|
1979
1976
|
// src/manager/guild/ChannelManager/NewsChannelManager.ts
|
|
1980
|
-
var
|
|
1977
|
+
var import_discord11 = require("discord.js");
|
|
1981
1978
|
var NewsChannelManager = class extends GuildChannelManager {
|
|
1982
1979
|
static async findInGuild(guildId, channelId) {
|
|
1983
1980
|
const channel = await super.findInGuild(guildId, channelId);
|
|
1984
|
-
return channel instanceof
|
|
1981
|
+
return channel instanceof import_discord11.NewsChannel ? channel : null;
|
|
1985
1982
|
}
|
|
1986
1983
|
static async find(channelId) {
|
|
1987
1984
|
const channel = await super.find(channelId);
|
|
1988
|
-
return channel instanceof
|
|
1985
|
+
return channel instanceof import_discord11.NewsChannel ? channel : null;
|
|
1989
1986
|
}
|
|
1990
1987
|
static findAll(guildId) {
|
|
1991
1988
|
const guild = Bot.client.guilds.cache.get(guildId);
|
|
@@ -1993,27 +1990,27 @@ var NewsChannelManager = class extends GuildChannelManager {
|
|
|
1993
1990
|
Log.warn(`Guild ${guildId} not found`);
|
|
1994
1991
|
return [];
|
|
1995
1992
|
}
|
|
1996
|
-
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof
|
|
1993
|
+
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof import_discord11.NewsChannel);
|
|
1997
1994
|
}
|
|
1998
1995
|
static async create(guildId, name, options) {
|
|
1999
1996
|
return await super._create(guildId, {
|
|
2000
1997
|
name,
|
|
2001
|
-
type:
|
|
1998
|
+
type: import_discord11.ChannelType.GuildAnnouncement,
|
|
2002
1999
|
...options
|
|
2003
2000
|
});
|
|
2004
2001
|
}
|
|
2005
2002
|
};
|
|
2006
2003
|
|
|
2007
2004
|
// src/manager/guild/ChannelManager/StageChannelManager.ts
|
|
2008
|
-
var
|
|
2005
|
+
var import_discord12 = require("discord.js");
|
|
2009
2006
|
var StageChannelManager = class extends GuildChannelManager {
|
|
2010
2007
|
static async findInGuild(guildId, channelId) {
|
|
2011
2008
|
const channel = await super.findInGuild(guildId, channelId);
|
|
2012
|
-
return channel instanceof
|
|
2009
|
+
return channel instanceof import_discord12.StageChannel ? channel : null;
|
|
2013
2010
|
}
|
|
2014
2011
|
static async find(channelId) {
|
|
2015
2012
|
const channel = await super.find(channelId);
|
|
2016
|
-
return channel instanceof
|
|
2013
|
+
return channel instanceof import_discord12.StageChannel ? channel : null;
|
|
2017
2014
|
}
|
|
2018
2015
|
static findAll(guildId) {
|
|
2019
2016
|
const guild = Bot.client.guilds.cache.get(guildId);
|
|
@@ -2021,12 +2018,12 @@ var StageChannelManager = class extends GuildChannelManager {
|
|
|
2021
2018
|
Log.warn(`Guild ${guildId} not found`);
|
|
2022
2019
|
return [];
|
|
2023
2020
|
}
|
|
2024
|
-
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof
|
|
2021
|
+
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof import_discord12.StageChannel);
|
|
2025
2022
|
}
|
|
2026
2023
|
static async create(guildId, name, options) {
|
|
2027
2024
|
return await super._create(guildId, {
|
|
2028
2025
|
name,
|
|
2029
|
-
type:
|
|
2026
|
+
type: import_discord12.ChannelType.GuildStageVoice,
|
|
2030
2027
|
...options
|
|
2031
2028
|
});
|
|
2032
2029
|
}
|
|
@@ -2074,7 +2071,7 @@ var ThreadChannelManager = class {
|
|
|
2074
2071
|
};
|
|
2075
2072
|
|
|
2076
2073
|
// src/manager/guild/ChannelManager/GuildVoiceChannelManager.ts
|
|
2077
|
-
var
|
|
2074
|
+
var import_discord13 = require("discord.js");
|
|
2078
2075
|
var GuildVoiceChannelManager = class extends GuildChannelManager {
|
|
2079
2076
|
static async findInGuild(guildId, channelId) {
|
|
2080
2077
|
const channel = await super.findInGuild(guildId, channelId);
|
|
@@ -2090,12 +2087,12 @@ var GuildVoiceChannelManager = class extends GuildChannelManager {
|
|
|
2090
2087
|
Log.warn(`Guild ${guildId} not found`);
|
|
2091
2088
|
return [];
|
|
2092
2089
|
}
|
|
2093
|
-
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof
|
|
2090
|
+
return Array.from(guild.channels.cache.values()).filter((c) => c instanceof import_discord13.VoiceChannel);
|
|
2094
2091
|
}
|
|
2095
2092
|
static async create(guildId, name, options) {
|
|
2096
2093
|
return await super._create(guildId, {
|
|
2097
2094
|
name,
|
|
2098
|
-
type:
|
|
2095
|
+
type: import_discord13.ChannelType.GuildVoice,
|
|
2099
2096
|
...options
|
|
2100
2097
|
});
|
|
2101
2098
|
}
|
|
@@ -2216,7 +2213,7 @@ var GuildManager = class {
|
|
|
2216
2213
|
*/
|
|
2217
2214
|
static async fetchAllMembers(guildId, MAX_ATTEMPTS = 3, RETRY_DELAY = Time.minute.MIN_05.toMilliseconds()) {
|
|
2218
2215
|
let guild;
|
|
2219
|
-
if (guildId instanceof
|
|
2216
|
+
if (guildId instanceof import_discord14.Guild) {
|
|
2220
2217
|
guild = guildId;
|
|
2221
2218
|
} else {
|
|
2222
2219
|
let tmp = Bot.client.guilds.cache.get(guildId);
|
|
@@ -2269,10 +2266,10 @@ var GuildManager = class {
|
|
|
2269
2266
|
if (!toChannel) {
|
|
2270
2267
|
throw new Error(`To channel ${toChannelId} not found`);
|
|
2271
2268
|
}
|
|
2272
|
-
if (!(fromChannel instanceof
|
|
2269
|
+
if (!(fromChannel instanceof import_discord14.VoiceChannel || fromChannel instanceof import_discord14.StageChannel)) {
|
|
2273
2270
|
throw new Error(`From channel ${fromChannelId} is not a voice/stage channel`);
|
|
2274
2271
|
}
|
|
2275
|
-
if (!(toChannel instanceof
|
|
2272
|
+
if (!(toChannel instanceof import_discord14.VoiceChannel || toChannel instanceof import_discord14.StageChannel)) {
|
|
2276
2273
|
throw new Error(`To channel ${toChannelId} is not a voice/stage channel`);
|
|
2277
2274
|
}
|
|
2278
2275
|
if (member.voice.channelId !== fromChannelId) {
|
|
@@ -2309,7 +2306,7 @@ var UserManager = class extends BasicUserManager {
|
|
|
2309
2306
|
};
|
|
2310
2307
|
|
|
2311
2308
|
// src/manager/interactions/ModalManager.ts
|
|
2312
|
-
var
|
|
2309
|
+
var import_discord15 = require("discord.js");
|
|
2313
2310
|
var ModalManager = class _ModalManager {
|
|
2314
2311
|
/**
|
|
2315
2312
|
* Load modal from JSON file and return ModalBuilder
|
|
@@ -2335,17 +2332,17 @@ var ModalManager = class _ModalManager {
|
|
|
2335
2332
|
}
|
|
2336
2333
|
}
|
|
2337
2334
|
static jsonToBuilder(json) {
|
|
2338
|
-
const modal = new
|
|
2335
|
+
const modal = new import_discord15.ModalBuilder().setCustomId(json.customId).setTitle(json.title.slice(0, 45));
|
|
2339
2336
|
const actionRows = [];
|
|
2340
2337
|
for (const fieldJson of json.fields) {
|
|
2341
2338
|
const input = this.fieldJsonToInput(fieldJson);
|
|
2342
|
-
const row = new
|
|
2339
|
+
const row = new import_discord15.ActionRowBuilder().addComponents(input);
|
|
2343
2340
|
actionRows.push(row);
|
|
2344
2341
|
}
|
|
2345
2342
|
return modal.addComponents(...actionRows);
|
|
2346
2343
|
}
|
|
2347
2344
|
static fieldJsonToInput(fieldJson) {
|
|
2348
|
-
const input = new
|
|
2345
|
+
const input = new import_discord15.TextInputBuilder().setCustomId(fieldJson.customId).setLabel(fieldJson.title.slice(0, 45)).setPlaceholder(fieldJson.placeholder || "Enter value...").setRequired(fieldJson.required !== false).setMinLength(fieldJson.minLength || 0).setMaxLength(fieldJson.maxLength || 400);
|
|
2349
2346
|
const style = fieldJson.style;
|
|
2350
2347
|
if (typeof style === "number") {
|
|
2351
2348
|
input.setStyle(style);
|
|
@@ -2354,13 +2351,13 @@ var ModalManager = class _ModalManager {
|
|
|
2354
2351
|
case "Number":
|
|
2355
2352
|
case "Phone":
|
|
2356
2353
|
case "Date":
|
|
2357
|
-
input.setStyle(
|
|
2354
|
+
input.setStyle(import_discord15.TextInputStyle.Short);
|
|
2358
2355
|
input.setPlaceholder(
|
|
2359
2356
|
style === "Number" ? "123" : style === "Phone" ? "+33 6 12 34 56 78" : "2024-02-05"
|
|
2360
2357
|
);
|
|
2361
2358
|
break;
|
|
2362
2359
|
default:
|
|
2363
|
-
input.setStyle(
|
|
2360
|
+
input.setStyle(import_discord15.TextInputStyle.Short);
|
|
2364
2361
|
}
|
|
2365
2362
|
}
|
|
2366
2363
|
return input;
|
|
@@ -2396,13 +2393,13 @@ var ModalManager = class _ModalManager {
|
|
|
2396
2393
|
};
|
|
2397
2394
|
|
|
2398
2395
|
// src/manager/interactions/SelectMenuManager.ts
|
|
2399
|
-
var
|
|
2396
|
+
var import_discord16 = require("discord.js");
|
|
2400
2397
|
var SelectMenuManager = class {
|
|
2401
2398
|
/**
|
|
2402
2399
|
* Creates base StringSelectMenu - SIMPLE API !
|
|
2403
2400
|
*/
|
|
2404
2401
|
static create(customId, placeholder = "Select an option...") {
|
|
2405
|
-
return new
|
|
2402
|
+
return new import_discord16.StringSelectMenuBuilder().setCustomId(customId).setPlaceholder(placeholder).setMinValues(1).setMaxValues(1);
|
|
2406
2403
|
}
|
|
2407
2404
|
/**
|
|
2408
2405
|
* Quick StringSelectMenu
|
|
@@ -2420,10 +2417,10 @@ var SelectMenuManager = class {
|
|
|
2420
2417
|
* Pagination menu
|
|
2421
2418
|
*/
|
|
2422
2419
|
static paginated(customId, options, pageSize = 25) {
|
|
2423
|
-
const row = new
|
|
2420
|
+
const row = new import_discord16.ActionRowBuilder();
|
|
2424
2421
|
for (let i = 0; i < options.length; i += pageSize) {
|
|
2425
2422
|
const pageOptions = options.slice(i, i + pageSize);
|
|
2426
|
-
const menu = new
|
|
2423
|
+
const menu = new import_discord16.StringSelectMenuBuilder().setCustomId(`${customId}_page_${Math.floor(i / pageSize)}`).setPlaceholder(`Page ${Math.floor(i / pageSize) + 1}`).addOptions(pageOptions.map((opt) => {
|
|
2427
2424
|
return this.option(opt);
|
|
2428
2425
|
}));
|
|
2429
2426
|
row.addComponents(menu);
|
|
@@ -2434,25 +2431,25 @@ var SelectMenuManager = class {
|
|
|
2434
2431
|
* User Select Menu (Components V2)
|
|
2435
2432
|
*/
|
|
2436
2433
|
static users(customId, placeholder = "Select users...") {
|
|
2437
|
-
return new
|
|
2434
|
+
return new import_discord16.UserSelectMenuBuilder().setCustomId(customId).setPlaceholder(placeholder).setMinValues(1).setMaxValues(25);
|
|
2438
2435
|
}
|
|
2439
2436
|
/**
|
|
2440
2437
|
* Role Select Menu (Components V2)
|
|
2441
2438
|
*/
|
|
2442
2439
|
static roles(customId, placeholder = "Select roles...") {
|
|
2443
|
-
return new
|
|
2440
|
+
return new import_discord16.RoleSelectMenuBuilder().setCustomId(customId).setPlaceholder(placeholder).setMinValues(1).setMaxValues(25);
|
|
2444
2441
|
}
|
|
2445
2442
|
/**
|
|
2446
2443
|
* Mentionable Select Menu (Components V2)
|
|
2447
2444
|
*/
|
|
2448
2445
|
static mentionables(customId, placeholder = "Select users/roles...") {
|
|
2449
|
-
return new
|
|
2446
|
+
return new import_discord16.MentionableSelectMenuBuilder().setCustomId(customId).setPlaceholder(placeholder).setMinValues(1).setMaxValues(25);
|
|
2450
2447
|
}
|
|
2451
2448
|
/**
|
|
2452
2449
|
* Channel Select Menu (Components V2)
|
|
2453
2450
|
*/
|
|
2454
2451
|
static channels(customId, placeholder = "Select channels...", channelTypes = []) {
|
|
2455
|
-
return new
|
|
2452
|
+
return new import_discord16.ChannelSelectMenuBuilder().setCustomId(customId).setPlaceholder(placeholder).setMinValues(1).setMaxValues(25).setChannelTypes(...channelTypes);
|
|
2456
2453
|
}
|
|
2457
2454
|
static option(option) {
|
|
2458
2455
|
if (Array.isArray(option)) {
|
|
@@ -2461,7 +2458,7 @@ var SelectMenuManager = class {
|
|
|
2461
2458
|
return this._createOption(option);
|
|
2462
2459
|
}
|
|
2463
2460
|
static _createOption(option) {
|
|
2464
|
-
const builder = new
|
|
2461
|
+
const builder = new import_discord16.StringSelectMenuOptionBuilder().setLabel(option.label).setValue(option.value);
|
|
2465
2462
|
option.description && builder.setDescription(option.description);
|
|
2466
2463
|
option.emoji && builder.setEmoji(option.emoji);
|
|
2467
2464
|
return builder;
|
|
@@ -2482,7 +2479,7 @@ var SelectMenuManager = class {
|
|
|
2482
2479
|
* ActionRow
|
|
2483
2480
|
*/
|
|
2484
2481
|
static row(component) {
|
|
2485
|
-
return new
|
|
2482
|
+
return new import_discord16.ActionRowBuilder().addComponents(component);
|
|
2486
2483
|
}
|
|
2487
2484
|
/**
|
|
2488
2485
|
* Rows multiples (5 max)
|
|
@@ -2535,7 +2532,7 @@ var SimpleMutex = class {
|
|
|
2535
2532
|
// package.json
|
|
2536
2533
|
var package_default = {
|
|
2537
2534
|
name: "@spatulox/simplediscordbot",
|
|
2538
|
-
version: "1.0.
|
|
2535
|
+
version: "1.0.36",
|
|
2539
2536
|
author: "Spatulox",
|
|
2540
2537
|
description: "Simple discord bot framework to set up a bot under 30 secondes",
|
|
2541
2538
|
exports: {
|
package/dist/index.mjs
CHANGED
|
@@ -486,7 +486,7 @@ var EmbedManager = class {
|
|
|
486
486
|
* Creates simple embed with just description
|
|
487
487
|
*/
|
|
488
488
|
static simple(description, color = null) {
|
|
489
|
-
return this.create(color).setDescription(description)
|
|
489
|
+
return this.create(color).setDescription(description);
|
|
490
490
|
}
|
|
491
491
|
/**
|
|
492
492
|
* Creates error embed
|
|
@@ -501,10 +501,10 @@ var EmbedManager = class {
|
|
|
501
501
|
return this.create(25600 /* minecraft */).setTitle("Success").setDescription(description);
|
|
502
502
|
}
|
|
503
503
|
/**
|
|
504
|
-
* Creates
|
|
504
|
+
* Creates a simply description embed
|
|
505
505
|
*/
|
|
506
506
|
static description(description) {
|
|
507
|
-
return this.create(
|
|
507
|
+
return this.create().setDescription(description).setFooter(null);
|
|
508
508
|
}
|
|
509
509
|
/**
|
|
510
510
|
* Creates debug embed
|
|
@@ -1233,11 +1233,6 @@ var WebhookManager = class {
|
|
|
1233
1233
|
// src/manager/guild/ChannelManager/GuildTextChannelManager.ts
|
|
1234
1234
|
import { TextChannel as TextChannel4, ChannelType } from "discord.js";
|
|
1235
1235
|
|
|
1236
|
-
// src/manager/guild/ChannelManager/GuildChannelManager.ts
|
|
1237
|
-
import {
|
|
1238
|
-
GuildChannel
|
|
1239
|
-
} from "discord.js";
|
|
1240
|
-
|
|
1241
1236
|
// src/manager/guild/ChannelManager/GuildMessageManager.ts
|
|
1242
1237
|
var GuildMessageManager = class {
|
|
1243
1238
|
/**
|
|
@@ -1342,9 +1337,9 @@ var _GuildChannelManager = class _GuildChannelManager {
|
|
|
1342
1337
|
static async find(channelId) {
|
|
1343
1338
|
try {
|
|
1344
1339
|
const cached = Bot.client.channels.cache.get(channelId);
|
|
1345
|
-
if (cached && cached
|
|
1340
|
+
if (cached && !cached.isDMBased()) return cached;
|
|
1346
1341
|
const channel = await Bot.client.channels.fetch(channelId);
|
|
1347
|
-
if (channel && channel
|
|
1342
|
+
if (channel && !channel.isDMBased()) return channel;
|
|
1348
1343
|
Log.warn(`Channel ${channelId} not found in any guild`);
|
|
1349
1344
|
return null;
|
|
1350
1345
|
} catch (error) {
|
|
@@ -2515,7 +2510,7 @@ var SimpleMutex = class {
|
|
|
2515
2510
|
// package.json
|
|
2516
2511
|
var package_default = {
|
|
2517
2512
|
name: "@spatulox/simplediscordbot",
|
|
2518
|
-
version: "1.0.
|
|
2513
|
+
version: "1.0.36",
|
|
2519
2514
|
author: "Spatulox",
|
|
2520
2515
|
description: "Simple discord bot framework to set up a bot under 30 secondes",
|
|
2521
2516
|
exports: {
|