mirror of
https://github.com/SrIzan10/sern-community.git
synced 2026-05-01 11:05:19 +00:00
chore: pretty and bump deps
This commit is contained in:
3
.prettierignore
Normal file
3
.prettierignore
Normal file
@@ -0,0 +1,3 @@
|
||||
dist/
|
||||
.yarnrc.yml
|
||||
.yarn/
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"useTabs": true
|
||||
"useTabs": true,
|
||||
"printWidth": 100
|
||||
}
|
||||
|
||||
823
.yarn/releases/yarn-3.3.1.cjs
vendored
823
.yarn/releases/yarn-3.3.1.cjs
vendored
File diff suppressed because one or more lines are too long
873
.yarn/releases/yarn-3.5.0.cjs
vendored
Normal file
873
.yarn/releases/yarn-3.5.0.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -2,4 +2,4 @@ enableGlobalCache: true
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.3.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.5.0.cjs
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# The official discord bot for our [discord](https://sern.dev/discord)
|
||||
|
||||
Features:
|
||||
|
||||
Features:
|
||||
- Bofa
|
||||
- Thread support help
|
||||
- Message triggers
|
||||
- Autocomplete documentation for our [handler](https://github.com/sern-handler/handler)
|
||||
- Autocomplete documentation for our [handler](https://github.com/sern-handler/handler)
|
||||
- Register your timezone to notify other's local time
|
||||
- Eval command
|
||||
- Hybrid commands
|
||||
|
||||
17
package.json
17
package.json
@@ -27,20 +27,21 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@octokit/rest": "^19.0.7",
|
||||
"@sern/handler": "2.6.1",
|
||||
"discord.js": "14.8.0",
|
||||
"@octokit/rest": "19.0.7",
|
||||
"@sern/handler": "2.6.2",
|
||||
"discord.js": "14.9.0",
|
||||
"dotenv": "16.0.3",
|
||||
"jsdoc-parse-plus": "1.3.0",
|
||||
"string-similarity": "4.0.4",
|
||||
"trie-search": "1.3.6",
|
||||
"undici": "5.14.0",
|
||||
"trie-search": "1.4.1",
|
||||
"undici": "5.22.0",
|
||||
"winston": "3.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "18.11.18",
|
||||
"@types/node": "18.16.3",
|
||||
"@types/string-similarity": "4.0.0",
|
||||
"tsup": "6.5.0"
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "5.0.4"
|
||||
},
|
||||
"packageManager": "yarn@3.3.1"
|
||||
"packageManager": "yarn@3.5.0"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"language": "typescript",
|
||||
"paths": {
|
||||
"base": "src",
|
||||
"commands": "commands"
|
||||
}
|
||||
}
|
||||
"language": "typescript",
|
||||
"paths": {
|
||||
"base": "src",
|
||||
"commands": "commands"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { commandModule, CommandType } from "@sern/handler";
|
||||
import { ApplicationCommandOptionType, Colors, EmbedBuilder } from "discord.js";
|
||||
import {
|
||||
Kind,
|
||||
PurpleComment,
|
||||
PurpleSummary,
|
||||
TentacledKindString,
|
||||
} from "../../typings/docs.js";
|
||||
import { Kind, PurpleComment, PurpleSummary, TentacledKindString } from "../../typings/docs.js";
|
||||
import { Paginator } from "#utils";
|
||||
import { publish } from "#plugins";
|
||||
import DocHandler from "../trie/doc-autocmp.js";
|
||||
@@ -18,9 +13,7 @@ function handleComments(sum: PurpleSummary) {
|
||||
case Kind.InlineTag:
|
||||
return {
|
||||
name: "Reference",
|
||||
value: `[${docHandler.DocTrie.search(sum.target!.toString())}](${
|
||||
sum.text
|
||||
})`,
|
||||
value: `[${docHandler.DocTrie.search(sum.target!.toString())}](${sum.text})`,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -40,13 +33,9 @@ export default commandModule({
|
||||
command: {
|
||||
onEvent: [],
|
||||
execute(autocomplete) {
|
||||
const choices = docHandler.DocTrie.search(
|
||||
autocomplete.options.getFocused()
|
||||
);
|
||||
const choices = docHandler.DocTrie.search(autocomplete.options.getFocused());
|
||||
return autocomplete.respond(
|
||||
choices
|
||||
.map((res) => ({ name: res.node.name, value: res.node.name }))
|
||||
.slice(0, 25)
|
||||
choices.map((res) => ({ name: res.node.name, value: res.node.name })).slice(0, 25)
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -64,9 +53,7 @@ export default commandModule({
|
||||
const comments =
|
||||
res.node.kindString === TentacledKindString.Function
|
||||
? res.node.signatures?.flatMap((dec) => {
|
||||
const summary = dec.comment?.summary as
|
||||
| PurpleSummary[]
|
||||
| undefined;
|
||||
const summary = dec.comment?.summary as PurpleSummary[] | undefined;
|
||||
return summary?.map(handleComments) ?? [];
|
||||
})
|
||||
: res.node.comment?.summary?.map(handleComments);
|
||||
@@ -99,11 +86,7 @@ export default commandModule({
|
||||
});
|
||||
|
||||
return new EmbedBuilder()
|
||||
.addFields(
|
||||
{ name: "Category", value: res.name },
|
||||
...(comments ?? []),
|
||||
...(blockTags ?? [])
|
||||
)
|
||||
.addFields({ name: "Category", value: res.name }, ...(comments ?? []), ...(blockTags ?? []))
|
||||
.setTitle(`🔖 ${res.node.name}`)
|
||||
.setColor(Colors.DarkVividPink)
|
||||
.setAuthor({
|
||||
|
||||
@@ -15,7 +15,7 @@ import { cooldown, publish } from "#plugins";
|
||||
import { Resolver, slashCommand } from "#utils";
|
||||
|
||||
export default slashCommand({
|
||||
description: "Submit an emoji",
|
||||
description: "Submit an emoji",
|
||||
plugins: [publish({ dmPermission: false }), cooldown.add([["user", "1/15"]])],
|
||||
options: [
|
||||
{
|
||||
@@ -53,11 +53,7 @@ export default slashCommand({
|
||||
const attachment = args.getAttachment("attachment");
|
||||
const urlString = args.getString("url");
|
||||
const name = args.getString("name", true);
|
||||
const send = sendTo(
|
||||
"1014582281907753080",
|
||||
ctx.member as GuildMember,
|
||||
name
|
||||
);
|
||||
const send = sendTo("1014582281907753080", ctx.member as GuildMember, name);
|
||||
|
||||
if (attachment) {
|
||||
const isValidAttachment = verify(
|
||||
@@ -66,8 +62,7 @@ export default slashCommand({
|
||||
(a) => a.contentType?.startsWith("image/") || false,
|
||||
(a) =>
|
||||
["image/png", "image/jpg", "image/gif"].includes(
|
||||
a.contentType ??
|
||||
"Something that is not png or jpg when contentType is null"
|
||||
a.contentType ?? "Something that is not png or jpg when contentType is null"
|
||||
)
|
||||
);
|
||||
if (!isValidAttachment) {
|
||||
@@ -103,10 +98,7 @@ export default slashCommand({
|
||||
},
|
||||
});
|
||||
|
||||
function verify<T>(
|
||||
attachment: T,
|
||||
...conditions: ((attachment: T) => boolean)[]
|
||||
) {
|
||||
function verify<T>(attachment: T, ...conditions: ((attachment: T) => boolean)[]) {
|
||||
return conditions.reduce((partial, func) => {
|
||||
return func(attachment) && partial;
|
||||
}, true);
|
||||
@@ -143,9 +135,7 @@ function sendTo(channelId: Snowflake, member: GuildMember, name: string) {
|
||||
)
|
||||
.setTimestamp();
|
||||
|
||||
const channel = (await context.client.channels.fetch(
|
||||
channelId
|
||||
)) as TextChannel;
|
||||
const channel = (await context.client.channels.fetch(channelId)) as TextChannel;
|
||||
if (payload instanceof Attachment) {
|
||||
embed.setImage(`attachment://${payload.name}`);
|
||||
} else embed.setImage(payload.toString());
|
||||
|
||||
@@ -16,9 +16,7 @@ export default commandModule({
|
||||
if (code.includes("await")) {
|
||||
const ar = code.split(";");
|
||||
const last = ar.pop();
|
||||
code = `(async () => {\n${ar.join(";\n")}\nreturn ${
|
||||
last?.trim() ?? " "
|
||||
}\n\n})();`;
|
||||
code = `(async () => {\n${ar.join(";\n")}\nreturn ${last?.trim() ?? " "}\n\n})();`;
|
||||
}
|
||||
const { channel, guild, client, user, member, message: msg } = ctx;
|
||||
if (
|
||||
@@ -34,8 +32,7 @@ export default commandModule({
|
||||
} catch (error) {
|
||||
result = error;
|
||||
}
|
||||
if (result instanceof Promise)
|
||||
result = await result.catch((e: Error) => new Error(e.message));
|
||||
if (result instanceof Promise) result = await result.catch((e: Error) => new Error(e.message));
|
||||
if (typeof result !== "string") {
|
||||
result = inspect(result, {
|
||||
depth: 0,
|
||||
@@ -57,13 +54,9 @@ export default commandModule({
|
||||
.setColor(0xcc5279)
|
||||
.setTitle("v2 is out!")
|
||||
.setThumbnail(client.user?.displayAvatarURL() ?? "")
|
||||
.setImage(
|
||||
"https://raw.githubusercontent.com/sern-handler/.github/main/banner.png"
|
||||
)
|
||||
.setImage("https://raw.githubusercontent.com/sern-handler/.github/main/banner.png")
|
||||
.setAuthor({ name: "sern", url: "https://sern.dev/" })
|
||||
.setDescription(
|
||||
`__**Quick Look:**__\n\n${text()}\n\nThank you all for being patient!`
|
||||
)
|
||||
.setDescription(`__**Quick Look:**__\n\n${text()}\n\nThank you all for being patient!`)
|
||||
.setFooter({ text: "Supports DJS v14.7 and above" })
|
||||
.setTimestamp();
|
||||
const content = ping ? "@everyone" : undefined;
|
||||
|
||||
@@ -22,11 +22,9 @@ export default slashCommand({
|
||||
},
|
||||
],
|
||||
execute: async (context) => {
|
||||
const opponent =
|
||||
context.interaction.options.getUser("user") ?? context.client.user!;
|
||||
const opponent = context.interaction.options.getUser("user") ?? context.client.user!;
|
||||
|
||||
if (opponent.id === context.user.id)
|
||||
return context.reply(`Can't play with yourself dumb dumb`);
|
||||
if (opponent.id === context.user.id) return context.reply(`Can't play with yourself dumb dumb`);
|
||||
|
||||
const buttons = ["🪨|Rock", "📄|Paper", "✂|Scissors"].map((s) => {
|
||||
const [emoji, label] = s.split("|");
|
||||
@@ -75,9 +73,7 @@ export default slashCommand({
|
||||
: undefined
|
||||
) as Choice;
|
||||
|
||||
userChoice ??= (
|
||||
i.user.id === context.user.id ? i.customId : undefined
|
||||
) as Choice;
|
||||
userChoice ??= (i.user.id === context.user.id ? i.customId : undefined) as Choice;
|
||||
return [userChoice, opponentChoice];
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@ export default commandModule({
|
||||
const [octokit] = useContainer("octokit");
|
||||
|
||||
const text = ctx.options.getFocused();
|
||||
const org = await octokit.repos.listForOrg({ org: "sern-handler" });
|
||||
const org = await octokit.repos.listForOrg({
|
||||
org: "sern-handler",
|
||||
});
|
||||
|
||||
if (!org) return ctx.respond([]);
|
||||
|
||||
@@ -33,18 +35,21 @@ export default commandModule({
|
||||
|
||||
const publicRepos = topRepos
|
||||
.filter((r) => !r.private)
|
||||
.map((repo) => ({ name: `sern/${repo.name}`, value: repo.name }));
|
||||
.map((repo) => ({
|
||||
name: `sern/${repo.name}`,
|
||||
value: repo.name,
|
||||
}));
|
||||
|
||||
if (!text.length) {
|
||||
return ctx.respond(publicRepos.slice(0, 25)).catch(() => null);
|
||||
}
|
||||
return ctx.respond(
|
||||
publicRepos
|
||||
.filter((repo) =>
|
||||
repo.name.toLowerCase().includes(text.toLowerCase())
|
||||
)
|
||||
.slice(0, 25)
|
||||
).catch(() => null);
|
||||
return ctx
|
||||
.respond(
|
||||
publicRepos
|
||||
.filter((repo) => repo.name.toLowerCase().includes(text.toLowerCase()))
|
||||
.slice(0, 25)
|
||||
)
|
||||
.catch(() => null);
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -86,28 +91,24 @@ export default commandModule({
|
||||
if (!issues) return ctx.respond([]);
|
||||
|
||||
const map = issues.data.map((issue) => ({
|
||||
name: cutText(
|
||||
`${prefix(issue.pull_request)}${issue.number} - ${issue.title}`
|
||||
),
|
||||
name: cutText(`${prefix(issue.pull_request)}${issue.number} - ${issue.title}`),
|
||||
value: issue.number,
|
||||
}));
|
||||
|
||||
return ctx.respond(map).catch(() => null);
|
||||
}
|
||||
|
||||
return ctx.respond(
|
||||
search?.data.items
|
||||
.filter((i) => i.title.toLowerCase().includes(text.toLowerCase()))
|
||||
.map((issue) => ({
|
||||
name: cutText(
|
||||
`${prefix(issue.pull_request)}${issue.number} - ${
|
||||
issue.title
|
||||
}`
|
||||
),
|
||||
value: issue.number,
|
||||
}))
|
||||
.slice(0, 25) ?? []
|
||||
).catch(() => null);
|
||||
return ctx
|
||||
.respond(
|
||||
search?.data.items
|
||||
.filter((i) => i.title.toLowerCase().includes(text.toLowerCase()))
|
||||
.map((issue) => ({
|
||||
name: cutText(`${prefix(issue.pull_request)}${issue.number} - ${issue.title}`),
|
||||
value: issue.number,
|
||||
}))
|
||||
.slice(0, 25) ?? []
|
||||
)
|
||||
.catch(() => null);
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -188,22 +189,16 @@ export default commandModule({
|
||||
break;
|
||||
}
|
||||
}
|
||||
return `${str} ${new Timestamp(
|
||||
new Date(time).getTime()
|
||||
).getRelativeTime()}`;
|
||||
return `${str} ${new Timestamp(new Date(time).getTime()).getRelativeTime()}`;
|
||||
};
|
||||
|
||||
let reply = target
|
||||
? `*GitHub ${
|
||||
issue.pull_request ? "Pull Request" : "Issue"
|
||||
} data for ${target}*\n`
|
||||
? `*GitHub ${issue.pull_request ? "Pull Request" : "Issue"} data for ${target}*\n`
|
||||
: "";
|
||||
|
||||
reply += `${emoji(issue)} [\`${prefix(
|
||||
issue.pull_request
|
||||
)}${number} sern/${repo}\`](<${issue.html_url}>)\n___${
|
||||
issue.title
|
||||
}___ by [*${issue.user!.login}*](<${issue.user?.html_url}>) ${suffix(
|
||||
reply += `${emoji(issue)} [\`${prefix(issue.pull_request)}${number} sern/${repo}\`](<${
|
||||
issue.html_url
|
||||
}>)\n___${issue.title}___ by [*${issue.user!.login}*](<${issue.user?.html_url}>) ${suffix(
|
||||
issue
|
||||
)}`;
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { ownerIDs } from "#constants";
|
||||
import { commandModule, CommandType } from "@sern/handler";
|
||||
import {
|
||||
ActionRowBuilder,
|
||||
ModalBuilder,
|
||||
TextInputBuilder,
|
||||
TextInputStyle,
|
||||
} from "discord.js";
|
||||
import { ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js";
|
||||
|
||||
export default commandModule({
|
||||
type: CommandType.Button,
|
||||
@@ -19,9 +14,7 @@ export default commandModule({
|
||||
|
||||
const suggestedName = ctx.message.embeds[0].fields[0].value!;
|
||||
|
||||
const modal = new ModalBuilder()
|
||||
.setCustomId("emojiModal")
|
||||
.setTitle("Emoji Creation");
|
||||
const modal = new ModalBuilder().setCustomId("emojiModal").setTitle("Emoji Creation");
|
||||
|
||||
const row = new ActionRowBuilder<TextInputBuilder>().setComponents(
|
||||
new TextInputBuilder() //
|
||||
|
||||
@@ -16,9 +16,7 @@ export default commandModule({
|
||||
|
||||
const components = [
|
||||
new ActionRowBuilder<ButtonBuilder>().setComponents(
|
||||
ctx.message!.components[0].components.map((c) =>
|
||||
new ButtonBuilder(c.data).setDisabled()
|
||||
)
|
||||
ctx.message!.components[0].components.map((c) => new ButtonBuilder(c.data).setDisabled())
|
||||
),
|
||||
];
|
||||
|
||||
@@ -26,8 +24,7 @@ export default commandModule({
|
||||
.setFields(ctx.message!.embeds[0].fields[0], {
|
||||
name: "Status",
|
||||
value:
|
||||
`Denied by ${ctx.user}` +
|
||||
"\nThank you but we are not interested in this at the moment!",
|
||||
`Denied by ${ctx.user}` + "\nThank you but we are not interested in this at the moment!",
|
||||
})
|
||||
.setColor("Red")
|
||||
.setTimestamp();
|
||||
|
||||
@@ -32,9 +32,7 @@ export default commandModule({
|
||||
|
||||
const components = [
|
||||
new ActionRowBuilder<ButtonBuilder>().setComponents(
|
||||
ctx.message!.components[0].components.map((c) =>
|
||||
new ButtonBuilder(c.data).setDisabled()
|
||||
)
|
||||
ctx.message!.components[0].components.map((c) => new ButtonBuilder(c.data).setDisabled())
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ export default commandModule({
|
||||
const roles = interaction.values;
|
||||
|
||||
const menuRoles: string[] = (
|
||||
interaction.message.components[0].components[0]
|
||||
.data as Readonly<APIStringSelectComponent>
|
||||
interaction.message.components[0].components[0].data as Readonly<APIStringSelectComponent>
|
||||
).options.map((o: { label: string; value: string }) => o.value);
|
||||
|
||||
const member = interaction.member as GuildMember;
|
||||
|
||||
@@ -38,9 +38,7 @@ export default commandModule({
|
||||
return ctx.reply(`Tag __${tagName}__ already exists`);
|
||||
}
|
||||
|
||||
const similarKeywords = file.filter((t) =>
|
||||
t.keywords.some((k) => tag.keywords.includes(k))
|
||||
);
|
||||
const similarKeywords = file.filter((t) => t.keywords.some((k) => tag.keywords.includes(k)));
|
||||
if (similarKeywords.length) {
|
||||
return ctx.reply(
|
||||
`Tag __${tagName}__ has similar keywords to __${similarKeywords
|
||||
|
||||
@@ -26,9 +26,7 @@ export default commandModule({
|
||||
};
|
||||
const filePath = `./tags.json`;
|
||||
const file: TagData[] = require(`${process.cwd()}/tags.json`);
|
||||
const oldTag = file.find(
|
||||
(t) => t.name === (ctx.user.data as { tag: string }).tag
|
||||
)!;
|
||||
const oldTag = file.find((t) => t.name === (ctx.user.data as { tag: string }).tag)!;
|
||||
|
||||
const similarKeywords = file.filter(
|
||||
(t) =>
|
||||
@@ -44,8 +42,7 @@ export default commandModule({
|
||||
);
|
||||
}
|
||||
|
||||
file[file.findIndex((t) => t.name === (ctx.user.data as UserTag).tag)] =
|
||||
tag;
|
||||
file[file.findIndex((t) => t.name === (ctx.user.data as UserTag).tag)] = tag;
|
||||
|
||||
writeFileSync(filePath, JSON.stringify(file, null, 2));
|
||||
|
||||
|
||||
@@ -7,13 +7,12 @@ import * as fs from "fs";
|
||||
import { AttachmentBuilder } from "discord.js";
|
||||
|
||||
async function ephemeral(ctx: Context, options: ReplyOptions) {
|
||||
const resolvedOptions =
|
||||
typeof options == "string" ? { content: options } : options;
|
||||
const resolvedOptions = typeof options == "string" ? { content: options } : options;
|
||||
await ctx.interaction.editReply({ ...resolvedOptions });
|
||||
}
|
||||
|
||||
export default slashCommand({
|
||||
description: "Fetch logs",
|
||||
description: "Fetch logs",
|
||||
plugins: [publish(), ownerOnly()],
|
||||
execute: async (ctx, args) => {
|
||||
try {
|
||||
|
||||
@@ -37,16 +37,13 @@ export default slashCommand({
|
||||
],
|
||||
async execute(ctx, [, options]) {
|
||||
const channel = options.getChannel("channel", true) as TextChannel;
|
||||
const role = new Resolver(options.getString("role", true), ctx.interaction)
|
||||
.roles;
|
||||
const role = new Resolver(options.getString("role", true), ctx.interaction).roles;
|
||||
const message = options.getString("message", true);
|
||||
|
||||
if (role.size > 25) return ctx.reply("Too many roles");
|
||||
|
||||
const cdn = role.filter(
|
||||
(r) =>
|
||||
r.managed ||
|
||||
r.position > (ctx.guild?.members.me)!.roles.highest.position
|
||||
(r) => r.managed || r.position > (ctx.guild?.members.me)!.roles.highest.position
|
||||
).size;
|
||||
if (cdn) {
|
||||
return ctx.reply(
|
||||
@@ -57,9 +54,7 @@ export default slashCommand({
|
||||
const row = createMenu(channel, role);
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle(message)
|
||||
.setDescription(
|
||||
`Please select your roles below\nYou can select multiple roles`
|
||||
)
|
||||
.setDescription(`Please select your roles below\nYou can select multiple roles`)
|
||||
.setColor(0xcc5279);
|
||||
await channel.send({
|
||||
embeds: [embed],
|
||||
|
||||
@@ -7,9 +7,7 @@ export default slashCommand({
|
||||
execute: async (context) => {
|
||||
const uptime = new Timestamp(context.client.readyTimestamp!);
|
||||
await context.reply(
|
||||
`Pong 🏓 \`${
|
||||
context.client.ws.ping
|
||||
}ms\`\nStarted running ${uptime.getRelativeTime()}`
|
||||
`Pong 🏓 \`${context.client.ws.ping}ms\`\nStarted running ${uptime.getRelativeTime()}`
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -17,8 +17,7 @@ export default slashCommand({
|
||||
async execute(ctx) {
|
||||
const { cache } = ctx.client;
|
||||
const focus = ctx.options.getFocused();
|
||||
if (!cache)
|
||||
return ctx.respond([{ name: "No plugins found", value: "" }]);
|
||||
if (!cache) return ctx.respond([{ name: "No plugins found", value: "" }]);
|
||||
const data = [...cache.values()] as Data[];
|
||||
|
||||
const plugins = data.map((d) => {
|
||||
@@ -26,9 +25,7 @@ export default slashCommand({
|
||||
return { name, value: d.download_url };
|
||||
});
|
||||
return ctx.respond(
|
||||
plugins.filter((p) =>
|
||||
p.name.toLowerCase().includes(focus?.toLowerCase())
|
||||
)
|
||||
plugins.filter((p) => p.name.toLowerCase().includes(focus?.toLowerCase()))
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -44,13 +41,10 @@ export default slashCommand({
|
||||
),
|
||||
],
|
||||
async execute(ctx, [, options]) {
|
||||
if (!ctx.client.cache)
|
||||
return ctx.reply("Plugins are uncached, contact Evo!");
|
||||
if (!ctx.client.cache) return ctx.reply("Plugins are uncached, contact Evo!");
|
||||
|
||||
const url = options.getString("plugin", true);
|
||||
const name = ctx.client.cache.findKey(
|
||||
(d) => d.download_url === url
|
||||
) as string;
|
||||
const name = ctx.client.cache.findKey((d) => d.download_url === url) as string;
|
||||
|
||||
if (!name || !ctx.client.cache.get(name)!.rawData)
|
||||
return ctx.reply(`No plugin found at this [link](<${url}>)`);
|
||||
|
||||
@@ -38,9 +38,7 @@ export async function cp(client: Client) {
|
||||
// TODO: use octokit instead of fetch
|
||||
for (const data of dataArray) {
|
||||
const name = data.name.replace(".ts", "");
|
||||
data.rawData = await (await fetch(data.download_url))
|
||||
.text()
|
||||
.catch(() => "");
|
||||
data.rawData = await (await fetch(data.download_url)).text().catch(() => "");
|
||||
cache.set(name, data);
|
||||
}
|
||||
client.cache = cache;
|
||||
|
||||
@@ -5,10 +5,7 @@ import { Timestamp, slashCommand } from "#utils";
|
||||
|
||||
export default slashCommand({
|
||||
description: "Solved the issue? Close the post!",
|
||||
plugins: [
|
||||
publish({ guildIds: ["889026545715400705"] }),
|
||||
channelOnly([forumID]),
|
||||
],
|
||||
plugins: [publish({ guildIds: ["889026545715400705"] }), channelOnly([forumID])],
|
||||
async execute(ctx) {
|
||||
if (!ctx.channel) return;
|
||||
if (!ctx.channel.isThread() || !ctx.channel.parent) return;
|
||||
@@ -16,9 +13,7 @@ export default slashCommand({
|
||||
if (!ctx.channel.ownerId) await ctx.channel.fetchOwner();
|
||||
if (!ownerIDs.concat(ctx.channel.ownerId!).includes(ctx.user.id)) return;
|
||||
|
||||
const tag = ctx.channel.parent.availableTags.find(
|
||||
(t) => t.name === "Solved"
|
||||
);
|
||||
const tag = ctx.channel.parent.availableTags.find((t) => t.name === "Solved");
|
||||
if (!tag)
|
||||
return ctx.reply({
|
||||
content: "Something bad happened, Please contact Evo!",
|
||||
@@ -26,24 +21,18 @@ export default slashCommand({
|
||||
});
|
||||
|
||||
const memberCount = `• \`${ctx.channel.memberCount}\` member(s) participated in this post!`;
|
||||
const msgCount = `• \`${
|
||||
(ctx.channel.messageCount ?? 0) + 1
|
||||
}\` message(s) are present here`;
|
||||
const msgCount = `• \`${(ctx.channel.messageCount ?? 0) + 1}\` message(s) are present here`;
|
||||
const msgSent = `• \`${
|
||||
(ctx.channel.totalMessageSent ?? 0) + 1
|
||||
}\` message(s) were sent in total here`;
|
||||
const createdAt = `• This post was created ${new Timestamp(
|
||||
ctx.channel.createdTimestamp!
|
||||
).getRelativeTime()}`;
|
||||
const solvedAt = `• This post was solved ${new Timestamp(
|
||||
Date.now()
|
||||
).getRelativeTime()}`;
|
||||
const solvedAt = `• This post was solved ${new Timestamp(Date.now()).getRelativeTime()}`;
|
||||
|
||||
const funstats = `${ctx.channel.memberCount ? memberCount : ""}\n${
|
||||
ctx.channel.messageCount ? msgCount : ""
|
||||
}\n${
|
||||
ctx.channel.totalMessageSent ? msgSent : ""
|
||||
}\n${createdAt}\n${solvedAt}`;
|
||||
}\n${ctx.channel.totalMessageSent ? msgSent : ""}\n${createdAt}\n${solvedAt}`;
|
||||
|
||||
await ctx.reply({
|
||||
content: `This post is now closed, glad the issue got solved!\n\n\n${funstats}`,
|
||||
@@ -53,11 +42,7 @@ export default slashCommand({
|
||||
await ctx.channel
|
||||
.setAppliedTags([...ctx.channel.appliedTags.slice(0, 4), tag.id])
|
||||
.catch(() => null);
|
||||
await ctx.channel
|
||||
.setLocked(true, `Closed by ${ctx.user.tag}`)
|
||||
.catch(() => null);
|
||||
await ctx.channel
|
||||
.setArchived(true, `Closed by ${ctx.user.tag}`)
|
||||
.catch(() => null);
|
||||
await ctx.channel.setLocked(true, `Closed by ${ctx.user.tag}`).catch(() => null);
|
||||
await ctx.channel.setArchived(true, `Closed by ${ctx.user.tag}`).catch(() => null);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -40,9 +40,7 @@ export default slashCommand({
|
||||
return ctx.respond(
|
||||
tags
|
||||
.filter((t) =>
|
||||
focus.length
|
||||
? t.toLowerCase().includes(focus.toLowerCase())
|
||||
: true
|
||||
focus.length ? t.toLowerCase().includes(focus.toLowerCase()) : true
|
||||
)
|
||||
.map((t) => ({ name: t, value: t }))
|
||||
);
|
||||
|
||||
@@ -14,7 +14,7 @@ import { slashCommand } from "#utils";
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
export default slashCommand({
|
||||
description: "Edit tags",
|
||||
description: "Edit tags",
|
||||
plugins: [publish(), ownerOnly([Evo, Seren])],
|
||||
options: [
|
||||
{
|
||||
@@ -46,9 +46,7 @@ export default slashCommand({
|
||||
return ctx.respond(
|
||||
tags
|
||||
.filter((t) =>
|
||||
focus.length
|
||||
? t.toLowerCase().includes(focus.toLowerCase())
|
||||
: true
|
||||
focus.length ? t.toLowerCase().includes(focus.toLowerCase()) : true
|
||||
)
|
||||
.map((t) => ({ name: t, value: t }))
|
||||
);
|
||||
@@ -82,9 +80,7 @@ export default slashCommand({
|
||||
return ctx.respond(
|
||||
tags
|
||||
.filter((t) =>
|
||||
focus.length
|
||||
? t.toLowerCase().includes(focus.toLowerCase())
|
||||
: true
|
||||
focus.length ? t.toLowerCase().includes(focus.toLowerCase()) : true
|
||||
)
|
||||
.map((t) => ({ name: t, value: t }))
|
||||
);
|
||||
@@ -102,9 +98,7 @@ export default slashCommand({
|
||||
const file: TagData[] = require(`${process.cwd()}/tags.json`);
|
||||
|
||||
if (subcmd === "create") {
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Tag Creation")
|
||||
.setCustomId("@sern/tag/create");
|
||||
const modal = new ModalBuilder().setTitle("Tag Creation").setCustomId("@sern/tag/create");
|
||||
|
||||
const tagName = new TextInputBuilder()
|
||||
.setCustomId("tag-name")
|
||||
@@ -146,9 +140,7 @@ export default slashCommand({
|
||||
if (!tagData) {
|
||||
return context.reply(`No tag found with name __${tag}__`);
|
||||
}
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Tag Edit")
|
||||
.setCustomId("@sern/tag/edit");
|
||||
const modal = new ModalBuilder().setTitle("Tag Edit").setCustomId("@sern/tag/edit");
|
||||
|
||||
const tagName = new TextInputBuilder()
|
||||
.setCustomId("tag-name")
|
||||
@@ -193,10 +185,7 @@ export default slashCommand({
|
||||
return context.reply("Tag not found");
|
||||
}
|
||||
file.splice(file.indexOf(tagData), 1);
|
||||
writeFileSync(
|
||||
`${process.cwd()}/tags.json`,
|
||||
JSON.stringify(file, null, 2)
|
||||
);
|
||||
writeFileSync(`${process.cwd()}/tags.json`, JSON.stringify(file, null, 2));
|
||||
|
||||
return context.reply(`Tag ${tag} deleted`);
|
||||
}
|
||||
|
||||
@@ -74,8 +74,7 @@ export default slashCommand({
|
||||
});
|
||||
|
||||
return ctx.reply({
|
||||
content:
|
||||
data?.ok ?? data?.error ?? "Something went wrong! Please try again",
|
||||
content: data?.ok ?? data?.error ?? "Something went wrong! Please try again",
|
||||
ephemeral: true,
|
||||
});
|
||||
}
|
||||
@@ -126,8 +125,7 @@ export default slashCommand({
|
||||
});
|
||||
|
||||
return ctx.reply({
|
||||
content:
|
||||
data?.ok ?? data?.error ?? "Something went wrong! Please try again",
|
||||
content: data?.ok ?? data?.error ?? "Something went wrong! Please try again",
|
||||
ephemeral: true,
|
||||
});
|
||||
}
|
||||
@@ -139,9 +137,7 @@ function fuzz(s: string, locale = false) {
|
||||
const path = `./time/${locale ? "countrylocalecodes" : "timezone"}.txt`;
|
||||
|
||||
let zones: string[] = JSON.parse(`${readFileSync(path)}`);
|
||||
zones = zones.filter((choice) =>
|
||||
choice.toLowerCase().includes(s.toLowerCase())
|
||||
);
|
||||
zones = zones.filter((choice) => choice.toLowerCase().includes(s.toLowerCase()));
|
||||
return zones.slice(0, 25).map((z) => ({ name: z, value: z }));
|
||||
}
|
||||
|
||||
|
||||
@@ -11,5 +11,5 @@ export const enum Emojis {
|
||||
PRDraft = "<:pr_draft:1101708908747309126>",
|
||||
IssueOpen = "<:issue_open:1101709315955511346>",
|
||||
IssueClosed = "<:issue_closed:1101716515771920424>",
|
||||
IssueNotPlanned = "<:issue_notplanned:1101719419434045540>"
|
||||
}
|
||||
IssueNotPlanned = "<:issue_notplanned:1101719419434045540>",
|
||||
}
|
||||
|
||||
@@ -8,8 +8,7 @@ export default eventModule({
|
||||
plugins: [onCorrectThread(forumID)],
|
||||
name: "threadCreate",
|
||||
async execute(thread: AnyThreadChannel, _: boolean) {
|
||||
if (thread.appliedTags.length > 3)
|
||||
await thread.setAppliedTags(thread.appliedTags.slice(0, 3));
|
||||
if (thread.appliedTags.length > 3) await thread.setAppliedTags(thread.appliedTags.slice(0, 3));
|
||||
|
||||
const msg = await thread.fetchStarterMessage().catch(() => null);
|
||||
if (!msg) return thread.setLocked(true);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
controller,
|
||||
EventControlPlugin,
|
||||
controller,
|
||||
EventControlPlugin,
|
||||
eventModule,
|
||||
EventType,
|
||||
Payload,
|
||||
@@ -21,12 +21,11 @@ export default eventModule({
|
||||
});
|
||||
|
||||
function filterFailedActivation() {
|
||||
return EventControlPlugin<EventType.Sern>(payload => {
|
||||
if (payload.type == PayloadType.Failure) {
|
||||
return controller.next();
|
||||
} else {
|
||||
return controller.stop();
|
||||
}
|
||||
|
||||
})
|
||||
return EventControlPlugin<EventType.Sern>((payload) => {
|
||||
if (payload.type == PayloadType.Failure) {
|
||||
return controller.next();
|
||||
} else {
|
||||
return controller.stop();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import { eventModule, EventType } from "@sern/handler";
|
||||
import {
|
||||
ActionRowBuilder,
|
||||
ButtonBuilder,
|
||||
ButtonStyle,
|
||||
EmbedBuilder,
|
||||
Message,
|
||||
} from "discord.js";
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, Message } from "discord.js";
|
||||
import { createRequire } from "module";
|
||||
import { FuzzyMatcher } from "../utils/FuzzyMatcher.js";
|
||||
import type { TagData, TagMessage } from "../types/index.js";
|
||||
@@ -24,10 +18,7 @@ export default eventModule({
|
||||
const { tag, confidence } = data;
|
||||
if (confidence <= 0.7) return;
|
||||
|
||||
if (
|
||||
message.author.data &&
|
||||
(message.author.data as { inCooldown: boolean }).inCooldown
|
||||
)
|
||||
if (message.author.data && (message.author.data as { inCooldown: boolean }).inCooldown)
|
||||
return message.react("🌿");
|
||||
|
||||
const mention = fuzz.mentionedUser;
|
||||
@@ -42,17 +33,12 @@ export default eventModule({
|
||||
.setStyle(ButtonStyle.Danger)
|
||||
.setCustomId("@falseTrigger");
|
||||
|
||||
const row = new ActionRowBuilder<ButtonBuilder>().setComponents([
|
||||
button,
|
||||
deleteButton,
|
||||
]);
|
||||
const row = new ActionRowBuilder<ButtonBuilder>().setComponents([button, deleteButton]);
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setDescription(tag.content.trim())
|
||||
.setFooter({
|
||||
text: `${message.author.tag} | Confidence: ${(confidence * 100).toFixed(
|
||||
2
|
||||
)}%`,
|
||||
text: `${message.author.tag} | Confidence: ${(confidence * 100).toFixed(2)}%`,
|
||||
iconURL: message.author.displayAvatarURL(),
|
||||
})
|
||||
.setColor("Random")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { eventModule, EventType } from "@sern/handler";
|
||||
import type { Message } from "discord.js";
|
||||
const wait = (await import('util')).promisify(setTimeout);
|
||||
const wait = (await import("util")).promisify(setTimeout);
|
||||
|
||||
export default eventModule({
|
||||
name: "messageCreate",
|
||||
|
||||
@@ -11,12 +11,7 @@ const client = new Client({
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.MessageContent,
|
||||
],
|
||||
partials: [
|
||||
Partials.GuildMember,
|
||||
Partials.Message,
|
||||
Partials.ThreadMember,
|
||||
Partials.Channel,
|
||||
],
|
||||
partials: [Partials.GuildMember, Partials.Message, Partials.ThreadMember, Partials.Channel],
|
||||
sweepers: {
|
||||
messages: {
|
||||
interval: 43200,
|
||||
@@ -28,7 +23,7 @@ const client = new Client({
|
||||
export interface BotDependencies extends Dependencies {
|
||||
"@sern/client": Singleton<Client>;
|
||||
"@sern/logger": Singleton<SernLogger>;
|
||||
"octokit": Singleton<Octokit>;
|
||||
octokit: Singleton<Octokit>;
|
||||
}
|
||||
|
||||
export const useContainer = Sern.makeDependencies<BotDependencies>({
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
import { CommandType, CommandControlPlugin, controller } from "@sern/handler";
|
||||
|
||||
export function channelOnly(
|
||||
channelIds: string[],
|
||||
onFail?: string
|
||||
) {
|
||||
return CommandControlPlugin<CommandType.Both>((ctx, _) => {
|
||||
if (!ctx.channel) throw new Error("Channel not found!");
|
||||
if (
|
||||
!channelIds.includes(ctx.channel.id) &&
|
||||
ctx.channel.isThread() &&
|
||||
!channelIds.includes(ctx.channel.parentId!)
|
||||
export function channelOnly(channelIds: string[], onFail?: string) {
|
||||
return CommandControlPlugin<CommandType.Both>((ctx, _) => {
|
||||
if (!ctx.channel) throw new Error("Channel not found!");
|
||||
if (
|
||||
!channelIds.includes(ctx.channel.id) &&
|
||||
ctx.channel.isThread() &&
|
||||
!channelIds.includes(ctx.channel.parentId!)
|
||||
) {
|
||||
onFail ? ctx.reply({ content: onFail, ephemeral: true }) : null;
|
||||
return controller.stop();
|
||||
}
|
||||
return controller.next();
|
||||
|
||||
})
|
||||
onFail ? ctx.reply({ content: onFail, ephemeral: true }) : null;
|
||||
return controller.stop();
|
||||
}
|
||||
return controller.next();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -17,12 +17,7 @@
|
||||
* ```
|
||||
*/
|
||||
|
||||
import {
|
||||
CommandControlPlugin,
|
||||
CommandType,
|
||||
Context,
|
||||
controller,
|
||||
} from "@sern/handler";
|
||||
import { CommandControlPlugin, CommandType, Context, controller } from "@sern/handler";
|
||||
import { GuildMember } from "discord.js";
|
||||
/**
|
||||
* actions/seconds
|
||||
@@ -41,10 +36,7 @@ export enum CooldownLocation {
|
||||
|
||||
export class ExpiryMap<K, V> extends Map<K, V> {
|
||||
public readonly expiry: number;
|
||||
constructor(
|
||||
expiry: number = Infinity,
|
||||
iterable: [K, V][] | ReadonlyMap<K, V> = []
|
||||
) {
|
||||
constructor(expiry: number = Infinity, iterable: [K, V][] | ReadonlyMap<K, V> = []) {
|
||||
super(iterable);
|
||||
this.expiry = expiry;
|
||||
}
|
||||
@@ -61,10 +53,7 @@ export class ExpiryMap<K, V> extends Map<K, V> {
|
||||
|
||||
export const map = new ExpiryMap<string, number>();
|
||||
|
||||
function parseCooldown(
|
||||
location: CooldownLocation,
|
||||
cooldown: CooldownString
|
||||
): Cooldown {
|
||||
function parseCooldown(location: CooldownLocation, cooldown: CooldownString): Cooldown {
|
||||
const [actions, seconds] = cooldown.split("/").map((s) => Number(s));
|
||||
|
||||
if (
|
||||
@@ -107,10 +96,7 @@ export interface RecievedCooldown {
|
||||
type CooldownResponse = (cooldown: RecievedCooldown) => any;
|
||||
|
||||
function add(
|
||||
items: Array<
|
||||
| [CooldownLocation | keyof typeof CooldownLocation, CooldownString]
|
||||
| Cooldown
|
||||
>,
|
||||
items: Array<[CooldownLocation | keyof typeof CooldownLocation, CooldownString] | Cooldown>,
|
||||
message?: CooldownResponse
|
||||
) {
|
||||
const raw = items.map((c) => {
|
||||
@@ -149,8 +135,7 @@ function add(
|
||||
type Location = (value: CooldownString) => ReturnType<typeof add>;
|
||||
|
||||
const locations: Record<CooldownLocation, Location> = {
|
||||
[CooldownLocation.channel]: (value) =>
|
||||
add([[CooldownLocation.channel, value]]),
|
||||
[CooldownLocation.channel]: (value) => add([[CooldownLocation.channel, value]]),
|
||||
[CooldownLocation.user]: (value) => add([[CooldownLocation.user, value]]),
|
||||
[CooldownLocation.guild]: (value) => add([[CooldownLocation.guild, value]]),
|
||||
};
|
||||
|
||||
@@ -2,18 +2,15 @@ import { controller, DiscordEventControlPlugin } from "@sern/handler";
|
||||
import { ChannelType } from "discord.js";
|
||||
|
||||
export function onCorrectThread(parentId: string) {
|
||||
return DiscordEventControlPlugin(
|
||||
"threadCreate",
|
||||
(thread, newlyMade) => {
|
||||
const isBadThread =
|
||||
!thread.parent ||
|
||||
thread.parentId !== parentId ||
|
||||
thread.parent.type !== ChannelType.GuildForum ||
|
||||
!newlyMade;
|
||||
if (!isBadThread) {
|
||||
return controller.next();
|
||||
}
|
||||
return controller.stop();
|
||||
}
|
||||
)
|
||||
return DiscordEventControlPlugin("threadCreate", (thread, newlyMade) => {
|
||||
const isBadThread =
|
||||
!thread.parent ||
|
||||
thread.parentId !== parentId ||
|
||||
thread.parent.type !== ChannelType.GuildForum ||
|
||||
!newlyMade;
|
||||
if (!isBadThread) {
|
||||
return controller.next();
|
||||
}
|
||||
return controller.stop();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,18 +21,18 @@ import { CommandType, CommandControlPlugin, controller } from "@sern/handler";
|
||||
import { ownerIDs } from "#constants";
|
||||
|
||||
function map(s: string[]) {
|
||||
const userMention = (s: string) => `<@!${s}>`;
|
||||
return s.map((id) => `\` - \` ${userMention(id)}`).join("\n");
|
||||
const userMention = (s: string) => `<@!${s}>`;
|
||||
return s.map((id) => `\` - \` ${userMention(id)}`).join("\n");
|
||||
}
|
||||
export function ownerOnly(override?: string[]) {
|
||||
return CommandControlPlugin<CommandType.Both>(async (ctx, args) => {
|
||||
if ((override ?? ownerIDs).includes(ctx.user.id)) return controller.next();
|
||||
//* If you want to reply when the command fails due to user not being owner, you can use following
|
||||
await ctx.reply({
|
||||
content: `Not for you! Only these users can run this\n${map(override ?? ownerIDs)}`,
|
||||
ephemeral: true,
|
||||
allowedMentions: { repliedUser: false },
|
||||
});
|
||||
content: `Not for you! Only these users can run this\n${map(override ?? ownerIDs)}`,
|
||||
ephemeral: true,
|
||||
allowedMentions: { repliedUser: false },
|
||||
});
|
||||
return controller.stop(); //! Important: It stops the execution of command!
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,11 +24,7 @@ import {
|
||||
SernOptionsData,
|
||||
SlashCommand,
|
||||
} from "@sern/handler";
|
||||
import {
|
||||
ApplicationCommandData,
|
||||
ApplicationCommandType,
|
||||
PermissionResolvable,
|
||||
} from "discord.js";
|
||||
import { ApplicationCommandData, ApplicationCommandType, PermissionResolvable } from "discord.js";
|
||||
import { useContainer } from "../index.js";
|
||||
|
||||
export const CommandTypeRaw = {
|
||||
@@ -39,11 +35,7 @@ export const CommandTypeRaw = {
|
||||
} as const;
|
||||
|
||||
export function publish<
|
||||
T extends
|
||||
| CommandType.Both
|
||||
| CommandType.Slash
|
||||
| CommandType.CtxMsg
|
||||
| CommandType.CtxUser
|
||||
T extends CommandType.Both | CommandType.Slash | CommandType.CtxMsg | CommandType.CtxUser
|
||||
>(options?: PublishOptions) {
|
||||
return CommandInitPlugin<T>(async ({ module }) => {
|
||||
// Users need to provide their own useContainer function.
|
||||
@@ -54,8 +46,7 @@ export function publish<
|
||||
defaultMemberPermissions: null,
|
||||
};
|
||||
|
||||
options = { ...defaultOptions, ...options } as PublishOptions &
|
||||
ValidPublishOptions;
|
||||
options = { ...defaultOptions, ...options } as PublishOptions & ValidPublishOptions;
|
||||
let { defaultMemberPermissions, dmPermission, guildIds } =
|
||||
options as unknown as ValidPublishOptions;
|
||||
|
||||
@@ -87,10 +78,7 @@ export function publish<
|
||||
name: module.name,
|
||||
type: curAppType,
|
||||
description: cmd(module.description, ""),
|
||||
options: cmd(
|
||||
optionsTransformer((module as SlashCommand).options ?? []),
|
||||
[]
|
||||
),
|
||||
options: cmd(optionsTransformer((module as SlashCommand).options ?? []), []),
|
||||
defaultMemberPermissions,
|
||||
dmPermission,
|
||||
} as ApplicationCommandData;
|
||||
@@ -105,14 +93,8 @@ export function publish<
|
||||
);
|
||||
if (cmd) {
|
||||
if (!cmd.equals(commandData, true)) {
|
||||
logged(
|
||||
`Found differences in global command ${module.name}`
|
||||
);
|
||||
cmd.edit(commandData).then(
|
||||
log(
|
||||
`${module.name} updated with new data successfully!`
|
||||
)
|
||||
);
|
||||
logged(`Found differences in global command ${module.name}`);
|
||||
cmd.edit(commandData).then(log(`${module.name} updated with new data successfully!`));
|
||||
}
|
||||
return controller.next();
|
||||
}
|
||||
@@ -134,11 +116,7 @@ export function publish<
|
||||
logged(`Found differences in command ${module.name}`);
|
||||
guildCmd
|
||||
.edit(commandData)
|
||||
.then(
|
||||
log(
|
||||
`${module.name} updated with new data successfully!`
|
||||
)
|
||||
)
|
||||
.then(log(`${module.name} updated with new data successfully!`))
|
||||
.catch(c);
|
||||
continue;
|
||||
}
|
||||
@@ -159,9 +137,7 @@ export function publish<
|
||||
}
|
||||
|
||||
export function optionsTransformer(ops: Array<SernOptionsData>) {
|
||||
return ops.map((el) =>
|
||||
el.autocomplete ? (({ command, ...el }) => el)(el) : el
|
||||
);
|
||||
return ops.map((el) => (el.autocomplete ? (({ command, ...el }) => el)(el) : el));
|
||||
}
|
||||
|
||||
export type NonEmptyArray<T extends `${number}` = `${number}`> = [T, ...T[]];
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
import { CommandInitPlugin, CommandPlugin, CommandType, controller, PluginType } from "@sern/handler";
|
||||
import {
|
||||
CommandInitPlugin,
|
||||
CommandPlugin,
|
||||
CommandType,
|
||||
controller,
|
||||
PluginType,
|
||||
} from "@sern/handler";
|
||||
import type { Collection } from "discord.js";
|
||||
import { cp } from "../commands/refresh.js";
|
||||
import type { Data } from "../commands/plugin.js";
|
||||
import { useContainer } from "../../src/index.js";
|
||||
export function refreshCache() {
|
||||
return CommandInitPlugin<CommandType.Slash>(async (payload) => {
|
||||
const [client] = useContainer("@sern/client");
|
||||
const cache = await cp(client);
|
||||
client.cache = cache;
|
||||
return controller.next();
|
||||
})
|
||||
return CommandInitPlugin<CommandType.Slash>(async (payload) => {
|
||||
const [client] = useContainer("@sern/client");
|
||||
const cache = await cp(client);
|
||||
client.cache = cache;
|
||||
return controller.next();
|
||||
});
|
||||
}
|
||||
|
||||
declare module "discord.js" {
|
||||
|
||||
@@ -35,9 +35,7 @@ export default class DocHandler {
|
||||
}
|
||||
} else {
|
||||
const sectionChildNodes = section.children.map((id: string) => {
|
||||
const node = docs.children.find(
|
||||
(c: { id: string }) => c.id === id
|
||||
)! as DocsChild;
|
||||
const node = docs.children.find((c: { id: string }) => c.id === id)! as DocsChild;
|
||||
return {
|
||||
name: section.title,
|
||||
node,
|
||||
|
||||
@@ -3,10 +3,7 @@ import { findBestMatch } from "string-similarity";
|
||||
import type { TagData } from "../types/index.js";
|
||||
|
||||
export class FuzzyMatcher {
|
||||
public constructor(
|
||||
private readonly message: Message,
|
||||
private readonly tags: TagData[]
|
||||
) {}
|
||||
public constructor(private readonly message: Message, private readonly tags: TagData[]) {}
|
||||
|
||||
readonly #regex = /<@!?(?<id>\d{17,20})>/g;
|
||||
|
||||
@@ -19,17 +16,13 @@ export class FuzzyMatcher {
|
||||
}
|
||||
|
||||
public fuzzyMatch() {
|
||||
const keywords = this.tags
|
||||
.flatMap((t) => t.keywords)
|
||||
.map((k) => k.toLowerCase());
|
||||
const keywords = this.tags.flatMap((t) => t.keywords).map((k) => k.toLowerCase());
|
||||
const matches = findBestMatch(this.cleanContent.toLowerCase(), keywords);
|
||||
|
||||
if (matches.bestMatch.rating < 0.4) return null;
|
||||
const words = this.cleanContent.toLowerCase().split(" ");
|
||||
|
||||
const firstMatchedTag = this.tags.find((t) =>
|
||||
t.keywords.includes(matches.bestMatch.target)
|
||||
);
|
||||
const firstMatchedTag = this.tags.find((t) => t.keywords.includes(matches.bestMatch.target));
|
||||
if (!firstMatchedTag) return null;
|
||||
|
||||
const keyword = firstMatchedTag.keywords.find((k) => {
|
||||
|
||||
@@ -16,9 +16,7 @@ export class SernLogger implements Logging {
|
||||
})
|
||||
);
|
||||
} else {
|
||||
this._winston.add(
|
||||
new winston.transports.File({ filename: "error.log" })
|
||||
);
|
||||
this._winston.add(new winston.transports.File({ filename: "error.log" }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@ import {
|
||||
export class Paginator {
|
||||
private currentCount: number = 0;
|
||||
private selectMenuOptions?: RestOrArray<
|
||||
| SelectMenuOptionBuilder
|
||||
| APISelectMenuOption
|
||||
| SelectMenuComponentOptionData
|
||||
SelectMenuOptionBuilder | APISelectMenuOption | SelectMenuComponentOptionData
|
||||
>;
|
||||
private descriptions?: string[];
|
||||
|
||||
@@ -57,19 +55,14 @@ export class Paginator {
|
||||
|
||||
public setSelectMenuOptions(
|
||||
...options: RestOrArray<
|
||||
| SelectMenuOptionBuilder
|
||||
| APISelectMenuOption
|
||||
| SelectMenuComponentOptionData
|
||||
SelectMenuOptionBuilder | APISelectMenuOption | SelectMenuComponentOptionData
|
||||
>
|
||||
): this {
|
||||
this.selectMenuOptions = options;
|
||||
return this;
|
||||
}
|
||||
|
||||
public async run(
|
||||
messageOrInteraction: Message | CommandInteraction,
|
||||
user?: User
|
||||
) {
|
||||
public async run(messageOrInteraction: Message | CommandInteraction, user?: User) {
|
||||
this.sanityChecks();
|
||||
|
||||
const target = user
|
||||
@@ -85,19 +78,11 @@ export class Paginator {
|
||||
: [this.buildButtons()];
|
||||
|
||||
if (messageOrInteraction instanceof Message) {
|
||||
const message = await this.handleMessage(
|
||||
messageOrInteraction,
|
||||
embeds,
|
||||
rows
|
||||
);
|
||||
const message = await this.handleMessage(messageOrInteraction, embeds, rows);
|
||||
|
||||
return this.handleCollector(message, target);
|
||||
} else {
|
||||
const message = await this.handleInteraction(
|
||||
messageOrInteraction,
|
||||
embeds,
|
||||
rows
|
||||
);
|
||||
const message = await this.handleInteraction(messageOrInteraction, embeds, rows);
|
||||
return this.handleCollector(message, target);
|
||||
}
|
||||
}
|
||||
@@ -105,10 +90,7 @@ export class Paginator {
|
||||
private async handleMessage(
|
||||
message: Message,
|
||||
embeds: EmbedBuilder[],
|
||||
rows: (
|
||||
| ActionRowBuilder<StringSelectMenuBuilder>
|
||||
| ActionRowBuilder<ButtonBuilder>
|
||||
)[]
|
||||
rows: (ActionRowBuilder<StringSelectMenuBuilder> | ActionRowBuilder<ButtonBuilder>)[]
|
||||
) {
|
||||
const msg = await message.channel.send({
|
||||
embeds: [embeds![this.currentCount]],
|
||||
@@ -120,10 +102,7 @@ export class Paginator {
|
||||
private async handleInteraction(
|
||||
interaction: CommandInteraction,
|
||||
embeds: EmbedBuilder[],
|
||||
rows: (
|
||||
| ActionRowBuilder<StringSelectMenuBuilder>
|
||||
| ActionRowBuilder<ButtonBuilder>
|
||||
)[]
|
||||
rows: (ActionRowBuilder<StringSelectMenuBuilder> | ActionRowBuilder<ButtonBuilder>)[]
|
||||
) {
|
||||
let msg: Message<boolean>;
|
||||
if (interaction.replied || interaction.deferred) {
|
||||
@@ -254,9 +233,7 @@ export class Paginator {
|
||||
default: i === this.currentCount,
|
||||
})))
|
||||
);
|
||||
const row = new ActionRowBuilder<StringSelectMenuBuilder>().setComponents(
|
||||
select
|
||||
);
|
||||
const row = new ActionRowBuilder<StringSelectMenuBuilder>().setComponents(select);
|
||||
return row;
|
||||
}
|
||||
|
||||
@@ -279,9 +256,7 @@ export class Paginator {
|
||||
}
|
||||
|
||||
private updateSelect(components: ActionRow<MessageActionRowComponent>[]) {
|
||||
const selectMenuOption = (
|
||||
components[1].components[0].data as APIStringSelectComponent
|
||||
).options;
|
||||
const selectMenuOption = (components[1].components[0].data as APIStringSelectComponent).options;
|
||||
for (const option of selectMenuOption) {
|
||||
if (option.value === `${this.currentCount}`) option.default = true;
|
||||
else option.default = false;
|
||||
|
||||
@@ -43,11 +43,7 @@ export class TicTacToe {
|
||||
return user;
|
||||
}
|
||||
|
||||
public createCollector(
|
||||
response: InteractionResponse<boolean>,
|
||||
player: User,
|
||||
opponent: User
|
||||
) {
|
||||
public createCollector(response: InteractionResponse<boolean>, player: User, opponent: User) {
|
||||
return response.createMessageComponentCollector({
|
||||
componentType: ComponentType.Button,
|
||||
filter: (i) => [player.id, opponent.id].includes(i.user.id),
|
||||
@@ -76,11 +72,7 @@ export class TicTacToe {
|
||||
|
||||
const possibleWinner = this.computeWin(pieces);
|
||||
if (possibleWinner.winner) {
|
||||
this.disableAllButtons(
|
||||
pieces,
|
||||
possibleWinner.winner,
|
||||
possibleWinner.winPieces
|
||||
);
|
||||
this.disableAllButtons(pieces, possibleWinner.winner, possibleWinner.winPieces);
|
||||
collector.stop(`Finished!`);
|
||||
|
||||
return void (await i.update({
|
||||
@@ -100,9 +92,7 @@ export class TicTacToe {
|
||||
disabled === 9
|
||||
? "Game ended in tie, what a shame!"
|
||||
: `Let the game begin!\n${interaction.user} vs ${opponent}\n\n> Current Chance: ${chance} [${mark}]` +
|
||||
`\nTime ends ${new Timestamp(
|
||||
Date.now() + this.time!
|
||||
).getRelativeTime()}`;
|
||||
`\nTime ends ${new Timestamp(Date.now() + this.time!).getRelativeTime()}`;
|
||||
|
||||
await i.update({
|
||||
content,
|
||||
@@ -152,18 +142,10 @@ export class TicTacToe {
|
||||
public buildRows() {
|
||||
return Array<ActionRowBuilder>(3)
|
||||
.fill(new ActionRowBuilder())
|
||||
.map((_, i) =>
|
||||
new ActionRowBuilder<ButtonBuilder>().setComponents(
|
||||
this.buildButtons(i)
|
||||
)
|
||||
);
|
||||
.map((_, i) => new ActionRowBuilder<ButtonBuilder>().setComponents(this.buildButtons(i)));
|
||||
}
|
||||
|
||||
public mark(
|
||||
rows: ActionRowBuilder<ButtonBuilder>[],
|
||||
id: string,
|
||||
mark: "X" | "O"
|
||||
) {
|
||||
public mark(rows: ActionRowBuilder<ButtonBuilder>[], id: string, mark: "X" | "O") {
|
||||
for (const row of rows) {
|
||||
for (const button of row.components) {
|
||||
if ((button.data as APIButtonComponentWithCustomId).custom_id === id) {
|
||||
@@ -187,26 +169,17 @@ export class TicTacToe {
|
||||
const { emoji } = piece.data;
|
||||
if (!emoji) continue;
|
||||
const emojiString = `<:${emoji.name}:${emoji.id}>`;
|
||||
const id = (piece.data as APIButtonComponentWithCustomId)
|
||||
.custom_id as Combination;
|
||||
const id = (piece.data as APIButtonComponentWithCustomId).custom_id as Combination;
|
||||
if (emojiString === this.#X) markedX.push(id);
|
||||
else markedO.push(id);
|
||||
}
|
||||
}
|
||||
if (
|
||||
this.#WinConditions.find((win) => win.every((r) => markedX.includes(r)))
|
||||
) {
|
||||
winPieces = this.#WinConditions.find((win) =>
|
||||
win.every((r) => markedX.includes(r))
|
||||
)!;
|
||||
if (this.#WinConditions.find((win) => win.every((r) => markedX.includes(r)))) {
|
||||
winPieces = this.#WinConditions.find((win) => win.every((r) => markedX.includes(r)))!;
|
||||
winner = "X";
|
||||
}
|
||||
if (
|
||||
this.#WinConditions.find((win) => win.every((r) => markedO.includes(r)))
|
||||
) {
|
||||
winPieces = this.#WinConditions.find((win) =>
|
||||
win.every((r) => markedO.includes(r))
|
||||
)!;
|
||||
if (this.#WinConditions.find((win) => win.every((r) => markedO.includes(r)))) {
|
||||
winPieces = this.#WinConditions.find((win) => win.every((r) => markedO.includes(r)))!;
|
||||
winner = "O";
|
||||
}
|
||||
return { winner, winPieces };
|
||||
@@ -227,9 +200,7 @@ export class TicTacToe {
|
||||
if (
|
||||
win === emojiString &&
|
||||
winPieces.some((w) =>
|
||||
w.includes(
|
||||
(piece.data as APIButtonComponentWithCustomId).custom_id
|
||||
)
|
||||
w.includes((piece.data as APIButtonComponentWithCustomId).custom_id)
|
||||
)
|
||||
)
|
||||
piece.setStyle(ButtonStyle.Success);
|
||||
|
||||
@@ -5,8 +5,7 @@ export class Timestamp {
|
||||
* @requires [UNIX](https://en.wikipedia.org/wiki/Unix_time) timestamp in `milliseconds`
|
||||
*/
|
||||
public constructor(public readonly timestamp: number) {
|
||||
if (this.timestamp < 0)
|
||||
throw new Error("Timestamp must be a positive number");
|
||||
if (this.timestamp < 0) throw new Error("Timestamp must be a positive number");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
AnyCommandPlugin,
|
||||
AnyCommandPlugin,
|
||||
BaseOptions,
|
||||
commandModule,
|
||||
CommandType,
|
||||
@@ -13,9 +13,7 @@ export function slashCommand(data: {
|
||||
name?: string;
|
||||
description: string;
|
||||
plugins?: AnyCommandPlugin[];
|
||||
options?:
|
||||
| (SernSubCommandData | SernSubCommandGroupData | BaseOptions)[]
|
||||
| undefined;
|
||||
options?: (SernSubCommandData | SernSubCommandGroupData | BaseOptions)[] | undefined;
|
||||
execute: (ctx: Context, args: ["slash", SlashOptions]) => any;
|
||||
}) {
|
||||
//Weird fix for explicit undefined fields in an object
|
||||
|
||||
@@ -8,4 +8,4 @@ export * from "./randomStatus.js";
|
||||
export * from "./codeUpload.js";
|
||||
export * from "./Logger.js";
|
||||
export * from "./composable/slashCommand.js";
|
||||
//export * from './SyncCommands.js';
|
||||
//export * from './SyncCommands.js';
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
ActionRowBuilder,
|
||||
ButtonBuilder,
|
||||
Message,
|
||||
EmbedBuilder,
|
||||
} from "discord.js";
|
||||
import { ActionRowBuilder, ButtonBuilder, Message, EmbedBuilder } from "discord.js";
|
||||
|
||||
export function Paginate() {
|
||||
const __embeds = [] as EmbedBuilder[];
|
||||
@@ -42,10 +37,7 @@ export function Paginate() {
|
||||
return {
|
||||
embeds: [__embeds.at(cur)!],
|
||||
components: [
|
||||
new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||
traverser[0],
|
||||
traverser[1]
|
||||
),
|
||||
new ActionRowBuilder<ButtonBuilder>().addComponents(traverser[0], traverser[1]),
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import { ActivityType, Client, ClientPresenceStatus } from "discord.js";
|
||||
|
||||
const statues: [
|
||||
Exclude<ActivityType, ActivityType.Custom>,
|
||||
string,
|
||||
ClientPresenceStatus
|
||||
][] = [
|
||||
const statues: [Exclude<ActivityType, ActivityType.Custom>, string, ClientPresenceStatus][] = [
|
||||
[ActivityType.Watching, "the sern community", "online"],
|
||||
[ActivityType.Listening, "Evo", "dnd"],
|
||||
[ActivityType.Playing, "with @sern/cli", "idle"],
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import { defineConfig } from "tsup";
|
||||
|
||||
export default defineConfig({
|
||||
clean: true,
|
||||
dts: false,
|
||||
entry: ["src/**/*.ts", "!src/**/*.d.ts", "typings/"],
|
||||
format: ["esm"],
|
||||
minify: false,
|
||||
silent: true,
|
||||
skipNodeModulesBundle: true,
|
||||
sourcemap: false,
|
||||
target: "esnext",
|
||||
bundle: false,
|
||||
shims: false,
|
||||
keepNames: true,
|
||||
splitting: false,
|
||||
define: {
|
||||
this: "global",
|
||||
},
|
||||
});
|
||||
import { defineConfig } from "tsup";
|
||||
|
||||
export default defineConfig({
|
||||
clean: true,
|
||||
dts: false,
|
||||
entry: ["src/**/*.ts", "!src/**/*.d.ts", "typings/"],
|
||||
format: ["esm"],
|
||||
minify: false,
|
||||
silent: true,
|
||||
skipNodeModulesBundle: true,
|
||||
sourcemap: false,
|
||||
target: "esnext",
|
||||
bundle: false,
|
||||
shims: false,
|
||||
keepNames: true,
|
||||
splitting: false,
|
||||
define: {
|
||||
this: "global",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,90 +1,79 @@
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
declare module 'trie-search' {
|
||||
type KeyFields = string | string[] | KeyFields[]
|
||||
|
||||
type TrieNode<T> = {
|
||||
value?: T[]
|
||||
[key: string]: TrieNode<T> | T[] | undefined
|
||||
}
|
||||
|
||||
type TrieSearchOptions<T> = {
|
||||
ignoreCase?: boolean
|
||||
maxCacheSize?: number
|
||||
cache?: boolean
|
||||
splitOnRegEx?: RegExp
|
||||
splitOnGetRegEx?: RegExp
|
||||
min?: number
|
||||
keepAll?: boolean
|
||||
keepAllKey?: string
|
||||
idFieldOrFunction?: string | ((item: T) => string)
|
||||
expandRegexes?: { regex: RegExp; alternate: string }[]
|
||||
insertFullUnsplitKey?: boolean
|
||||
}
|
||||
|
||||
type Reducer<A, T, I = T> = (
|
||||
accumulator: A | undefined,
|
||||
phrase: string,
|
||||
matches: T[],
|
||||
trieSearch: TrieSearch<T, I>
|
||||
) => A | undefined
|
||||
|
||||
export default class TrieSearch<T, I = T> {
|
||||
constructor(keyFields?: KeyFields, options?: TrieSearchOptions<I>)
|
||||
|
||||
size: number
|
||||
|
||||
root: TrieNode<T>
|
||||
|
||||
add(obj: T, customKeys?: KeyFields | number): void
|
||||
|
||||
expandString(value: string): string[]
|
||||
|
||||
addAll(arr: I[], customKeys?: KeyFields | number): void
|
||||
|
||||
reset(): void
|
||||
|
||||
clearCache(): void
|
||||
|
||||
cleanCache(): void
|
||||
|
||||
addFromObject(obj: T, valueField?: string): void
|
||||
|
||||
map(key: string, value: T): void
|
||||
|
||||
keyToArr(key: string): string[]
|
||||
|
||||
findNode(key: string): TrieNode<T> | undefined
|
||||
|
||||
_getCacheKey(phrase: string, limit?: number): string
|
||||
|
||||
_get(phrase: string, limit?: number): T[]
|
||||
|
||||
get(
|
||||
phrases: string | string[],
|
||||
reducer?: null | undefined,
|
||||
limit?: number
|
||||
): T[]
|
||||
|
||||
get<A>(
|
||||
phrases: string | string[],
|
||||
reducer?: Reducer<A, T, I>,
|
||||
limit?: number
|
||||
): A | undefined
|
||||
|
||||
search(phrases: string | string[], reducer?: null | undefined): I[]
|
||||
|
||||
search<A>(
|
||||
phrases: string | string[],
|
||||
reducer: Reducer<A, T, I>
|
||||
): A | undefined
|
||||
|
||||
getId(item: I): string
|
||||
|
||||
static UNION_REDUCER: <V>(
|
||||
accumulator: V[] | undefined,
|
||||
phrase: string,
|
||||
matches: V[],
|
||||
trieSearch: TrieSearch<V, V>
|
||||
) => V[]
|
||||
}
|
||||
}
|
||||
declare module "trie-search" {
|
||||
type KeyFields = string | string[] | KeyFields[];
|
||||
|
||||
type TrieNode<T> = {
|
||||
value?: T[];
|
||||
[key: string]: TrieNode<T> | T[] | undefined;
|
||||
};
|
||||
|
||||
type TrieSearchOptions<T> = {
|
||||
ignoreCase?: boolean;
|
||||
maxCacheSize?: number;
|
||||
cache?: boolean;
|
||||
splitOnRegEx?: RegExp;
|
||||
splitOnGetRegEx?: RegExp;
|
||||
min?: number;
|
||||
keepAll?: boolean;
|
||||
keepAllKey?: string;
|
||||
idFieldOrFunction?: string | ((item: T) => string);
|
||||
expandRegexes?: { regex: RegExp; alternate: string }[];
|
||||
insertFullUnsplitKey?: boolean;
|
||||
};
|
||||
|
||||
type Reducer<A, T, I = T> = (
|
||||
accumulator: A | undefined,
|
||||
phrase: string,
|
||||
matches: T[],
|
||||
trieSearch: TrieSearch<T, I>
|
||||
) => A | undefined;
|
||||
|
||||
export default class TrieSearch<T, I = T> {
|
||||
constructor(keyFields?: KeyFields, options?: TrieSearchOptions<I>);
|
||||
|
||||
size: number;
|
||||
|
||||
root: TrieNode<T>;
|
||||
|
||||
add(obj: T, customKeys?: KeyFields | number): void;
|
||||
|
||||
expandString(value: string): string[];
|
||||
|
||||
addAll(arr: I[], customKeys?: KeyFields | number): void;
|
||||
|
||||
reset(): void;
|
||||
|
||||
clearCache(): void;
|
||||
|
||||
cleanCache(): void;
|
||||
|
||||
addFromObject(obj: T, valueField?: string): void;
|
||||
|
||||
map(key: string, value: T): void;
|
||||
|
||||
keyToArr(key: string): string[];
|
||||
|
||||
findNode(key: string): TrieNode<T> | undefined;
|
||||
|
||||
_getCacheKey(phrase: string, limit?: number): string;
|
||||
|
||||
_get(phrase: string, limit?: number): T[];
|
||||
|
||||
get(phrases: string | string[], reducer?: null | undefined, limit?: number): T[];
|
||||
|
||||
get<A>(phrases: string | string[], reducer?: Reducer<A, T, I>, limit?: number): A | undefined;
|
||||
|
||||
search(phrases: string | string[], reducer?: null | undefined): I[];
|
||||
|
||||
search<A>(phrases: string | string[], reducer: Reducer<A, T, I>): A | undefined;
|
||||
|
||||
getId(item: I): string;
|
||||
|
||||
static UNION_REDUCER: <V>(
|
||||
accumulator: V[] | undefined,
|
||||
phrase: string,
|
||||
matches: V[],
|
||||
trieSearch: TrieSearch<V, V>
|
||||
) => V[];
|
||||
}
|
||||
}
|
||||
|
||||
1111
typings/docs.ts
1111
typings/docs.ts
File diff suppressed because it is too large
Load Diff
595
yarn.lock
595
yarn.lock
@@ -23,50 +23,50 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@discordjs/builders@npm:^1.5.0":
|
||||
version: 1.5.0
|
||||
resolution: "@discordjs/builders@npm:1.5.0"
|
||||
"@discordjs/builders@npm:^1.6.0":
|
||||
version: 1.6.1
|
||||
resolution: "@discordjs/builders@npm:1.6.1"
|
||||
dependencies:
|
||||
"@discordjs/formatters": ^0.2.0
|
||||
"@discordjs/formatters": ^0.3.0
|
||||
"@discordjs/util": ^0.2.0
|
||||
"@sapphire/shapeshift": ^3.8.1
|
||||
discord-api-types: ^0.37.35
|
||||
discord-api-types: ^0.37.37
|
||||
fast-deep-equal: ^3.1.3
|
||||
ts-mixer: ^6.0.3
|
||||
tslib: ^2.5.0
|
||||
checksum: 054bf380879412f19ae2ead6731fdce91ff3d3e91c93fa6c689392bffe75748c68ecb9fcd96e5d6119f8b793a485f5a5d4da943c8fdd8048827226755e3f048c
|
||||
checksum: 057b5585d17e6273d99aa4cb356ca845d54785d95c0af05418f30eb933cf0b80043f7941effe7a593142c6817f47b893c5a973dfd95f3db24e0570666781e2d9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@discordjs/collection@npm:^1.4.0":
|
||||
version: 1.4.0
|
||||
resolution: "@discordjs/collection@npm:1.4.0"
|
||||
checksum: fb6da43b3df8eeade104490a024918cb58690db58ef8bdc2e2812ffee7e166c9baae0c244306a8187179ffa17cab679dcd50ea7fde9bf137c76275a608acd6b3
|
||||
"@discordjs/collection@npm:^1.5.0":
|
||||
version: 1.5.0
|
||||
resolution: "@discordjs/collection@npm:1.5.0"
|
||||
checksum: 072043743c5e5ef99033f1c227fd92f437a0665b8f0a5bfa26bacc6610963d03b54c45da0e0116ce30e4612efc52b2db0a0827f79091a135409237722db5400a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@discordjs/formatters@npm:^0.2.0":
|
||||
version: 0.2.0
|
||||
resolution: "@discordjs/formatters@npm:0.2.0"
|
||||
"@discordjs/formatters@npm:^0.3.0":
|
||||
version: 0.3.0
|
||||
resolution: "@discordjs/formatters@npm:0.3.0"
|
||||
dependencies:
|
||||
discord-api-types: ^0.37.35
|
||||
checksum: cc721d1904501910288b48ae4c20df5fb1beff78f2463f780463f7fa7efe661bb739e324fb9e8b2c09aded3ce7cfcc2f58cd3793c0d61da96f87c50f666bf998
|
||||
discord-api-types: ^0.37.37
|
||||
checksum: cdf0d842f268a1b8c072522f58b0c77853e825964acb1e3b189f53d740d0d4ee4ed3b4be177ce4ab30a665bc1e6953348ab0d29b5fd52a0651e74eb63ad4be6d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@discordjs/rest@npm:^1.6.0":
|
||||
version: 1.6.0
|
||||
resolution: "@discordjs/rest@npm:1.6.0"
|
||||
"@discordjs/rest@npm:^1.7.0":
|
||||
version: 1.7.0
|
||||
resolution: "@discordjs/rest@npm:1.7.0"
|
||||
dependencies:
|
||||
"@discordjs/collection": ^1.4.0
|
||||
"@discordjs/collection": ^1.5.0
|
||||
"@discordjs/util": ^0.2.0
|
||||
"@sapphire/async-queue": ^1.5.0
|
||||
"@sapphire/snowflake": ^3.4.0
|
||||
discord-api-types: ^0.37.35
|
||||
discord-api-types: ^0.37.37
|
||||
file-type: ^18.2.1
|
||||
tslib: ^2.5.0
|
||||
undici: ^5.20.0
|
||||
checksum: 4370919696401b052602b34bc0a421811efb1360eed7f904206e20216cba052a63bf08e0307222523f8c5d8066b08264ae95a8037b2e86969cffba68e18aaefe
|
||||
undici: ^5.21.0
|
||||
checksum: 5d52ae02b77abafbcd70c650a9760625a7afab37875a7fc85404e1053e12745aeca819747ad4dbbaab78b1df0a33a050b980b1e91ba356c496bb0ea93d32e10f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -77,20 +77,160 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/android-arm@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "@esbuild/android-arm@npm:0.15.10"
|
||||
"@esbuild/android-arm64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/android-arm64@npm:0.17.18"
|
||||
conditions: os=android & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/android-arm@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/android-arm@npm:0.17.18"
|
||||
conditions: os=android & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-loong64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "@esbuild/linux-loong64@npm:0.15.10"
|
||||
"@esbuild/android-x64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/android-x64@npm:0.17.18"
|
||||
conditions: os=android & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/darwin-arm64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/darwin-arm64@npm:0.17.18"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/darwin-x64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/darwin-x64@npm:0.17.18"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/freebsd-arm64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/freebsd-arm64@npm:0.17.18"
|
||||
conditions: os=freebsd & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/freebsd-x64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/freebsd-x64@npm:0.17.18"
|
||||
conditions: os=freebsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-arm64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-arm64@npm:0.17.18"
|
||||
conditions: os=linux & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-arm@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-arm@npm:0.17.18"
|
||||
conditions: os=linux & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-ia32@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-ia32@npm:0.17.18"
|
||||
conditions: os=linux & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-loong64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-loong64@npm:0.17.18"
|
||||
conditions: os=linux & cpu=loong64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-mips64el@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-mips64el@npm:0.17.18"
|
||||
conditions: os=linux & cpu=mips64el
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-ppc64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-ppc64@npm:0.17.18"
|
||||
conditions: os=linux & cpu=ppc64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-riscv64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-riscv64@npm:0.17.18"
|
||||
conditions: os=linux & cpu=riscv64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-s390x@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-s390x@npm:0.17.18"
|
||||
conditions: os=linux & cpu=s390x
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-x64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/linux-x64@npm:0.17.18"
|
||||
conditions: os=linux & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/netbsd-x64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/netbsd-x64@npm:0.17.18"
|
||||
conditions: os=netbsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/openbsd-x64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/openbsd-x64@npm:0.17.18"
|
||||
conditions: os=openbsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/sunos-x64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/sunos-x64@npm:0.17.18"
|
||||
conditions: os=sunos & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/win32-arm64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/win32-arm64@npm:0.17.18"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/win32-ia32@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/win32-ia32@npm:0.17.18"
|
||||
conditions: os=win32 & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/win32-x64@npm:0.17.18":
|
||||
version: 0.17.18
|
||||
resolution: "@esbuild/win32-x64@npm:0.17.18"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@gar/promisify@npm:^1.1.3":
|
||||
version: 1.1.3
|
||||
resolution: "@gar/promisify@npm:1.1.3"
|
||||
@@ -255,7 +395,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@octokit/rest@npm:^19.0.7":
|
||||
"@octokit/rest@npm:19.0.7":
|
||||
version: 19.0.7
|
||||
resolution: "@octokit/rest@npm:19.0.7"
|
||||
dependencies:
|
||||
@@ -300,14 +440,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sern/handler@npm:2.6.1":
|
||||
version: 2.6.1
|
||||
resolution: "@sern/handler@npm:2.6.1"
|
||||
"@sern/handler@npm:2.6.2":
|
||||
version: 2.6.2
|
||||
resolution: "@sern/handler@npm:2.6.2"
|
||||
dependencies:
|
||||
iti: ^0.6.0
|
||||
rxjs: ^7.8.0
|
||||
ts-results-es: ^3.5.0
|
||||
checksum: 137220f5833afff0f907821acf4bfb07f4793d092884f706a62b88a7387e323b9ff4a6a0d9438d8ffc2730fc55c1d5d28c2417b95396df59269ada291b62da28
|
||||
ts-results-es: ^3.6.0
|
||||
checksum: 3c86047f09dc0e77044371e8964977e59521966a5ad080f8459dc9d0c02027c11c4ef86245b29a9b6e0122d665e508446f3daa30a2b81e426495b30d1b5e555e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -325,13 +465,20 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:*, @types/node@npm:18.11.18":
|
||||
"@types/node@npm:*":
|
||||
version: 18.11.18
|
||||
resolution: "@types/node@npm:18.11.18"
|
||||
checksum: 03f17f9480f8d775c8a72da5ea7e9383db5f6d85aa5fefde90dd953a1449bd5e4ffde376f139da4f3744b4c83942166d2a7603969a6f8ea826edfb16e6e3b49d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:18.16.3":
|
||||
version: 18.16.3
|
||||
resolution: "@types/node@npm:18.16.3"
|
||||
checksum: 816b39d45b05ebdc6f362b630970df3f6d82f71d418a2555353522f4eeeb078fa201de5299f02c09a09faa975e43b2745fe19c263d44069f87ddf37d6c37b717
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/string-similarity@npm:4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "@types/string-similarity@npm:4.0.0"
|
||||
@@ -489,14 +636,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"bundle-require@npm:^3.1.2":
|
||||
version: 3.1.2
|
||||
resolution: "bundle-require@npm:3.1.2"
|
||||
"bundle-require@npm:^4.0.0":
|
||||
version: 4.0.1
|
||||
resolution: "bundle-require@npm:4.0.1"
|
||||
dependencies:
|
||||
load-tsconfig: ^0.2.0
|
||||
load-tsconfig: ^0.2.3
|
||||
peerDependencies:
|
||||
esbuild: ">=0.13"
|
||||
checksum: 71f8cb81bcde97825317b0e516b7e479ec70bd2370f55a8f02795c0df6d541e6562c4b9ec0427cc7b5b835103a8dcf306da04e3846fa468146358471490fcf81
|
||||
esbuild: ">=0.17"
|
||||
checksum: 737217e37b72d7bee431b5d839b86ba604430f3ec346f073071de2ce65f0915189d4394ddd4685e0366b2930f38c95742b58c7101b8c53d9a8381d453f0b3b8a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -711,31 +858,31 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"discord-api-types@npm:^0.37.35":
|
||||
version: 0.37.36
|
||||
resolution: "discord-api-types@npm:0.37.36"
|
||||
checksum: ba3de3640270738c6fcef515a5d3a22069c89973e7d95984a7ddf1633a6e01fef2b99d4524f4535771694f87e4d779aa7511f21e06abd1c25707b4791c29d386
|
||||
"discord-api-types@npm:^0.37.37":
|
||||
version: 0.37.40
|
||||
resolution: "discord-api-types@npm:0.37.40"
|
||||
checksum: d05ab85c10eeaed4b066e5b826adee8faf05d53c93234ece89c17ef7bf8ff967b9e1fb60f0b343475416910d898f1656f1b7afe33d9a001c2fd7e0245584b128
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"discord.js@npm:14.8.0":
|
||||
version: 14.8.0
|
||||
resolution: "discord.js@npm:14.8.0"
|
||||
"discord.js@npm:14.9.0":
|
||||
version: 14.9.0
|
||||
resolution: "discord.js@npm:14.9.0"
|
||||
dependencies:
|
||||
"@discordjs/builders": ^1.5.0
|
||||
"@discordjs/collection": ^1.4.0
|
||||
"@discordjs/formatters": ^0.2.0
|
||||
"@discordjs/rest": ^1.6.0
|
||||
"@discordjs/builders": ^1.6.0
|
||||
"@discordjs/collection": ^1.5.0
|
||||
"@discordjs/formatters": ^0.3.0
|
||||
"@discordjs/rest": ^1.7.0
|
||||
"@discordjs/util": ^0.2.0
|
||||
"@sapphire/snowflake": ^3.4.0
|
||||
"@types/ws": ^8.5.4
|
||||
discord-api-types: ^0.37.35
|
||||
discord-api-types: ^0.37.37
|
||||
fast-deep-equal: ^3.1.3
|
||||
lodash.snakecase: ^4.1.1
|
||||
tslib: ^2.5.0
|
||||
undici: ^5.20.0
|
||||
ws: ^8.12.1
|
||||
checksum: 47d20ee2c48cb612edd791e5908af120889cdb277b9e8fff0edd4013ce5a2eb459f7492bd01af59b229ac22966c35f8b1ce45b4668d48cee878b4093d6d48bd3
|
||||
undici: ^5.21.0
|
||||
ws: ^8.13.0
|
||||
checksum: 34589830f771b238975cbabb82531db78756b1b132b6b296ad845bc93755cfee34e65febb638e1b77e9e68d9ce2362cd4d4057123c37909e1354d670b747cb71
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -783,220 +930,80 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-android-64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-android-64@npm:0.15.10"
|
||||
conditions: os=android & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-android-arm64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-android-arm64@npm:0.15.10"
|
||||
conditions: os=android & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-darwin-64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-darwin-64@npm:0.15.10"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-darwin-arm64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-darwin-arm64@npm:0.15.10"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-freebsd-64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-freebsd-64@npm:0.15.10"
|
||||
conditions: os=freebsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-freebsd-arm64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-freebsd-arm64@npm:0.15.10"
|
||||
conditions: os=freebsd & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-linux-32@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-linux-32@npm:0.15.10"
|
||||
conditions: os=linux & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-linux-64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-linux-64@npm:0.15.10"
|
||||
conditions: os=linux & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-linux-arm64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-linux-arm64@npm:0.15.10"
|
||||
conditions: os=linux & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-linux-arm@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-linux-arm@npm:0.15.10"
|
||||
conditions: os=linux & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-linux-mips64le@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-linux-mips64le@npm:0.15.10"
|
||||
conditions: os=linux & cpu=mips64el
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-linux-ppc64le@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-linux-ppc64le@npm:0.15.10"
|
||||
conditions: os=linux & cpu=ppc64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-linux-riscv64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-linux-riscv64@npm:0.15.10"
|
||||
conditions: os=linux & cpu=riscv64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-linux-s390x@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-linux-s390x@npm:0.15.10"
|
||||
conditions: os=linux & cpu=s390x
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-netbsd-64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-netbsd-64@npm:0.15.10"
|
||||
conditions: os=netbsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-openbsd-64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-openbsd-64@npm:0.15.10"
|
||||
conditions: os=openbsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-sunos-64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-sunos-64@npm:0.15.10"
|
||||
conditions: os=sunos & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-windows-32@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-windows-32@npm:0.15.10"
|
||||
conditions: os=win32 & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-windows-64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-windows-64@npm:0.15.10"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-windows-arm64@npm:0.15.10":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild-windows-arm64@npm:0.15.10"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild@npm:^0.15.1":
|
||||
version: 0.15.10
|
||||
resolution: "esbuild@npm:0.15.10"
|
||||
"esbuild@npm:^0.17.6":
|
||||
version: 0.17.18
|
||||
resolution: "esbuild@npm:0.17.18"
|
||||
dependencies:
|
||||
"@esbuild/android-arm": 0.15.10
|
||||
"@esbuild/linux-loong64": 0.15.10
|
||||
esbuild-android-64: 0.15.10
|
||||
esbuild-android-arm64: 0.15.10
|
||||
esbuild-darwin-64: 0.15.10
|
||||
esbuild-darwin-arm64: 0.15.10
|
||||
esbuild-freebsd-64: 0.15.10
|
||||
esbuild-freebsd-arm64: 0.15.10
|
||||
esbuild-linux-32: 0.15.10
|
||||
esbuild-linux-64: 0.15.10
|
||||
esbuild-linux-arm: 0.15.10
|
||||
esbuild-linux-arm64: 0.15.10
|
||||
esbuild-linux-mips64le: 0.15.10
|
||||
esbuild-linux-ppc64le: 0.15.10
|
||||
esbuild-linux-riscv64: 0.15.10
|
||||
esbuild-linux-s390x: 0.15.10
|
||||
esbuild-netbsd-64: 0.15.10
|
||||
esbuild-openbsd-64: 0.15.10
|
||||
esbuild-sunos-64: 0.15.10
|
||||
esbuild-windows-32: 0.15.10
|
||||
esbuild-windows-64: 0.15.10
|
||||
esbuild-windows-arm64: 0.15.10
|
||||
"@esbuild/android-arm": 0.17.18
|
||||
"@esbuild/android-arm64": 0.17.18
|
||||
"@esbuild/android-x64": 0.17.18
|
||||
"@esbuild/darwin-arm64": 0.17.18
|
||||
"@esbuild/darwin-x64": 0.17.18
|
||||
"@esbuild/freebsd-arm64": 0.17.18
|
||||
"@esbuild/freebsd-x64": 0.17.18
|
||||
"@esbuild/linux-arm": 0.17.18
|
||||
"@esbuild/linux-arm64": 0.17.18
|
||||
"@esbuild/linux-ia32": 0.17.18
|
||||
"@esbuild/linux-loong64": 0.17.18
|
||||
"@esbuild/linux-mips64el": 0.17.18
|
||||
"@esbuild/linux-ppc64": 0.17.18
|
||||
"@esbuild/linux-riscv64": 0.17.18
|
||||
"@esbuild/linux-s390x": 0.17.18
|
||||
"@esbuild/linux-x64": 0.17.18
|
||||
"@esbuild/netbsd-x64": 0.17.18
|
||||
"@esbuild/openbsd-x64": 0.17.18
|
||||
"@esbuild/sunos-x64": 0.17.18
|
||||
"@esbuild/win32-arm64": 0.17.18
|
||||
"@esbuild/win32-ia32": 0.17.18
|
||||
"@esbuild/win32-x64": 0.17.18
|
||||
dependenciesMeta:
|
||||
"@esbuild/android-arm":
|
||||
optional: true
|
||||
"@esbuild/android-arm64":
|
||||
optional: true
|
||||
"@esbuild/android-x64":
|
||||
optional: true
|
||||
"@esbuild/darwin-arm64":
|
||||
optional: true
|
||||
"@esbuild/darwin-x64":
|
||||
optional: true
|
||||
"@esbuild/freebsd-arm64":
|
||||
optional: true
|
||||
"@esbuild/freebsd-x64":
|
||||
optional: true
|
||||
"@esbuild/linux-arm":
|
||||
optional: true
|
||||
"@esbuild/linux-arm64":
|
||||
optional: true
|
||||
"@esbuild/linux-ia32":
|
||||
optional: true
|
||||
"@esbuild/linux-loong64":
|
||||
optional: true
|
||||
esbuild-android-64:
|
||||
"@esbuild/linux-mips64el":
|
||||
optional: true
|
||||
esbuild-android-arm64:
|
||||
"@esbuild/linux-ppc64":
|
||||
optional: true
|
||||
esbuild-darwin-64:
|
||||
"@esbuild/linux-riscv64":
|
||||
optional: true
|
||||
esbuild-darwin-arm64:
|
||||
"@esbuild/linux-s390x":
|
||||
optional: true
|
||||
esbuild-freebsd-64:
|
||||
"@esbuild/linux-x64":
|
||||
optional: true
|
||||
esbuild-freebsd-arm64:
|
||||
"@esbuild/netbsd-x64":
|
||||
optional: true
|
||||
esbuild-linux-32:
|
||||
"@esbuild/openbsd-x64":
|
||||
optional: true
|
||||
esbuild-linux-64:
|
||||
"@esbuild/sunos-x64":
|
||||
optional: true
|
||||
esbuild-linux-arm:
|
||||
"@esbuild/win32-arm64":
|
||||
optional: true
|
||||
esbuild-linux-arm64:
|
||||
"@esbuild/win32-ia32":
|
||||
optional: true
|
||||
esbuild-linux-mips64le:
|
||||
optional: true
|
||||
esbuild-linux-ppc64le:
|
||||
optional: true
|
||||
esbuild-linux-riscv64:
|
||||
optional: true
|
||||
esbuild-linux-s390x:
|
||||
optional: true
|
||||
esbuild-netbsd-64:
|
||||
optional: true
|
||||
esbuild-openbsd-64:
|
||||
optional: true
|
||||
esbuild-sunos-64:
|
||||
optional: true
|
||||
esbuild-windows-32:
|
||||
optional: true
|
||||
esbuild-windows-64:
|
||||
optional: true
|
||||
esbuild-windows-arm64:
|
||||
"@esbuild/win32-x64":
|
||||
optional: true
|
||||
bin:
|
||||
esbuild: bin/esbuild
|
||||
checksum: bc2daadb952c527e7ab0a972fd4f79071c9fd3d948cd97290d3de8811b6b7fc0abc43fb20116dffa24dc923550f4fe7b0d930ff6418ae7dfbff3034c1a01d59a
|
||||
checksum: 900b333f649fd89804216fb61fb5a0ffadc6dc37a2ec3b5981b588f72821676ea649a7c0ec785f0dbe6e774080b084c8af5f6ee7adbc1b138faf2a8c35e2c69c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1462,10 +1469,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"load-tsconfig@npm:^0.2.0":
|
||||
version: 0.2.3
|
||||
resolution: "load-tsconfig@npm:0.2.3"
|
||||
checksum: e28d1b2725fda76ee69fa4ee21b1257fd5b77b12e1be09cdc0b67f953e62ffbc3e7ac1a6267ec21309f95310cd10635e28a3cb38d04be3f7d683c4fe7914d7a9
|
||||
"load-tsconfig@npm:^0.2.3":
|
||||
version: 0.2.5
|
||||
resolution: "load-tsconfig@npm:0.2.5"
|
||||
checksum: 631740833c4a7157bb7b6eeae6e1afb6a6fac7416b7ba91bd0944d5c5198270af2d68bf8347af3cc2ba821adc4d83ef98f66278bd263bc284c863a09ec441503
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -2039,17 +2046,18 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "sern-community@workspace:."
|
||||
dependencies:
|
||||
"@octokit/rest": ^19.0.7
|
||||
"@sern/handler": 2.6.1
|
||||
"@types/node": 18.11.18
|
||||
"@octokit/rest": 19.0.7
|
||||
"@sern/handler": 2.6.2
|
||||
"@types/node": 18.16.3
|
||||
"@types/string-similarity": 4.0.0
|
||||
discord.js: 14.8.0
|
||||
discord.js: 14.9.0
|
||||
dotenv: 16.0.3
|
||||
jsdoc-parse-plus: 1.3.0
|
||||
string-similarity: 4.0.4
|
||||
trie-search: 1.3.6
|
||||
tsup: 6.5.0
|
||||
undici: 5.14.0
|
||||
trie-search: 1.4.1
|
||||
tsup: 6.7.0
|
||||
typescript: 5.0.4
|
||||
undici: 5.22.0
|
||||
winston: 3.8.2
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@@ -2313,12 +2321,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"trie-search@npm:1.3.6":
|
||||
version: 1.3.6
|
||||
resolution: "trie-search@npm:1.3.6"
|
||||
"trie-search@npm:1.4.1":
|
||||
version: 1.4.1
|
||||
resolution: "trie-search@npm:1.4.1"
|
||||
dependencies:
|
||||
hasharray: ^1.1.1
|
||||
checksum: 6c0fcfbb178ea76267dab62a328b01c8220e08640ce26686097aa5d44ba4741a537bde58631e3405250a25bc7b0a565f3108a1600f265d7f11e21ad18fdf020e
|
||||
checksum: 7c06288ab9ecaf680ad7ec4c6850db369deb484a7206ae50fae62660edd941421b8f2cf0aaea441aef0c5c2cb281141df30177962ea4a709998473765a8b037c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -2343,10 +2351,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ts-results-es@npm:^3.5.0":
|
||||
version: 3.5.0
|
||||
resolution: "ts-results-es@npm:3.5.0"
|
||||
checksum: 35d371781a04c43dbb941ab5f34b800c53a2a28c54784f9e600cd87cb63c4ee4c3fec0ebb2b0d0771fe44e3d81f7bb6d25ccebfc04adcb72e00349d435d9a89f
|
||||
"ts-results-es@npm:^3.6.0":
|
||||
version: 3.6.0
|
||||
resolution: "ts-results-es@npm:3.6.0"
|
||||
checksum: 28593545cad764efce2de64b09037f855c3bbd499e3f5e2683863c86abc9b4453e5aa7d651edff93d42340a2c24f8bbabcf92467fcec767e09bbeeac01e97396
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -2364,15 +2372,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tsup@npm:6.5.0":
|
||||
version: 6.5.0
|
||||
resolution: "tsup@npm:6.5.0"
|
||||
"tsup@npm:6.7.0":
|
||||
version: 6.7.0
|
||||
resolution: "tsup@npm:6.7.0"
|
||||
dependencies:
|
||||
bundle-require: ^3.1.2
|
||||
bundle-require: ^4.0.0
|
||||
cac: ^6.7.12
|
||||
chokidar: ^3.5.1
|
||||
debug: ^4.3.1
|
||||
esbuild: ^0.15.1
|
||||
esbuild: ^0.17.6
|
||||
execa: ^5.0.0
|
||||
globby: ^11.0.3
|
||||
joycon: ^3.0.1
|
||||
@@ -2385,7 +2393,7 @@ __metadata:
|
||||
peerDependencies:
|
||||
"@swc/core": ^1
|
||||
postcss: ^8.4.12
|
||||
typescript: ^4.1.0
|
||||
typescript: ">=4.1.0"
|
||||
peerDependenciesMeta:
|
||||
"@swc/core":
|
||||
optional: true
|
||||
@@ -2396,25 +2404,36 @@ __metadata:
|
||||
bin:
|
||||
tsup: dist/cli-default.js
|
||||
tsup-node: dist/cli-node.js
|
||||
checksum: 625082f2a2afc63024ddd54f5aca28372a7b4ec4f7c402f8aacefd0c56d8da7250665dbb4097d40edcf2cbd4168d96ed4593ecb903ab36e625628f375980e266
|
||||
checksum: 91ff179f0b9828a6880b6decaa8603fd7af0311f46a38d3a93647a2497298750d676810aeff533a335443a01a7b340dbba7c76523bcd7a87d7b05b7677742901
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici@npm:5.14.0":
|
||||
version: 5.14.0
|
||||
resolution: "undici@npm:5.14.0"
|
||||
dependencies:
|
||||
busboy: ^1.6.0
|
||||
checksum: 7a076e44d84b25844b4eb657034437b8b9bb91f17d347de474fdea1d4263ce7ae9406db79cd30de5642519277b4893f43073258bcc8fed420b295da3fdd11b26
|
||||
"typescript@npm:5.0.4":
|
||||
version: 5.0.4
|
||||
resolution: "typescript@npm:5.0.4"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
checksum: 82b94da3f4604a8946da585f7d6c3025fff8410779e5bde2855ab130d05e4fd08938b9e593b6ebed165bda6ad9292b230984f10952cf82f0a0ca07bbeaa08172
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici@npm:^5.20.0":
|
||||
version: 5.21.0
|
||||
resolution: "undici@npm:5.21.0"
|
||||
"typescript@patch:typescript@5.0.4#~builtin<compat/typescript>":
|
||||
version: 5.0.4
|
||||
resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin<compat/typescript>::version=5.0.4&hash=85af82"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
checksum: bb309d320c59a26565fb3793dba550576ab861018ff3fd1b7fccabbe46ae4a35546bc45f342c0a0b6f265c801ccdf64ffd68f548f117ceb7f0eac4b805cd52a9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici@npm:5.22.0, undici@npm:^5.21.0":
|
||||
version: 5.22.0
|
||||
resolution: "undici@npm:5.22.0"
|
||||
dependencies:
|
||||
busboy: ^1.6.0
|
||||
checksum: 013d5fd503b631d607942c511c2ab3f3fa78ebcab302acab998b43176b4815503ec15ed9752c5a47918b3bff8a0137768001d3eb57625b2bb6f6d30d8a794d6c
|
||||
checksum: 8dc55240a60ae7680798df344e8f46ad0f872ed0fa434fb94cc4fd2b5b2f8053bdf11994d15902999d3880f9bf7cd875a2e90883d2702bf0f366dacd9cbf3fc6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -2549,7 +2568,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ws@npm:^8.12.1":
|
||||
"ws@npm:^8.13.0":
|
||||
version: 8.13.0
|
||||
resolution: "ws@npm:8.13.0"
|
||||
peerDependencies:
|
||||
|
||||
Reference in New Issue
Block a user