Skip to content

Commit e4c4a05

Browse files
authored
⚑ feat (release πŸ€–): Stelle v3.2.5 πŸŽ‰(#33)
2 parents b35fe9c + d2fda24 commit e4c4a05

File tree

18 files changed

+170
-119
lines changed

18 files changed

+170
-119
lines changed

β€Ž.vscode/snippets.code-snippetsβ€Ž

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
"import { Declare, Command } from \"seyfert\";",
2323
"import { StelleOptions } from \"#stelle/decorators\";",
2424
"",
25-
"import { Configuration } from \"#stelle/data/Configuration.js\";",
26-
"",
2725
"@Declare({",
2826
" name: \"${1:example}\",",
2927
" description: \"${2:example}\",",
30-
" guildId: Configuration.guildIds,",
3128
" integrationTypes: [\"GuildInstall\"],",
3229
" contexts: [\"Guild\"],",
3330
"})",

β€Žpackage.jsonβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "stelle-music",
3-
"version": "0.3.2.1-BLAZER",
3+
"version": "0.3.2.5-BLAZER",
44
"description": "A music bot.",
55
"main": "./dist/index.js",
66
"type": "module",
7-
"packageManager": "[email protected].0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c",
7+
"packageManager": "[email protected].1+sha512.1acb565e6193efbebda772702950469150cf12bcc764262e7587e71d19dc98a423dff9536e57ea44c49bdf790ff694e83c27be5faa23d67e0c033b583be4bfcf",
88
"homepage": "https://github.com/Ganyu-Studios/stelle-music#readme",
99
"engines": {
1010
"node": ">= 22.11.0"
@@ -14,7 +14,7 @@
1414
"typecheck": "tsc --noEmit",
1515
"clean": "node ./scripts/clean.js && pnpm build",
1616
"start": "node ./dist/index.js",
17-
"dev": "tsx ./src/index.ts --debug",
17+
"dev": "tsx ./src/index.ts --debug --dev",
1818
"lint": "biome lint --write ./src",
1919
"format": "biome check --write ./src",
2020
"prepare": "husky"
@@ -35,18 +35,18 @@
3535
"url": "https://github.com/Ganyu-Studios/stelle-music/issues"
3636
},
3737
"dependencies": {
38-
"@prisma/client": "^6.0.1",
39-
"lavalink-client": "^2.4.2",
38+
"@prisma/client": "^6.1.0",
39+
"lavalink-client": "^2.4.3",
4040
"meowdb": "^2.2.3",
4141
"seyfert": "github:tiramisulabs/seyfert",
42-
"yunaforseyfert": "^1.0.4"
42+
"yunaforseyfert": "^1.1.0"
4343
},
4444
"devDependencies": {
4545
"@biomejs/biome": "^1.9.4",
4646
"@types/node": "^22.10.2",
4747
"husky": "^9.1.7",
4848
"lint-staged": "^15.2.11",
49-
"prisma": "^6.0.1",
49+
"prisma": "^6.1.0",
5050
"tsx": "^4.19.2",
5151
"typescript": "^5.7.2"
5252
},

β€Žpnpm-lock.yamlβ€Ž

Lines changed: 49 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žseyfert.config.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import { GatewayIntentBits } from "seyfert/lib/types/index.js";
44
import { config } from "seyfert";
55

6-
import { DEBUG_MODE } from "#stelle/data/Constants.js";
6+
import { DEV_MODE, DEBUG_MODE } from "#stelle/data/Constants.js";
77

8-
const output = DEBUG_MODE ? "src" : "dist";
8+
const output = DEV_MODE ? "src" : "dist";
99

1010
export default config.bot({
1111
token: process.env.TOKEN ?? "Trailblazer",

β€Žsrc/commands/developer/emit.tsβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Command, type CommandContext, Declare, type Guild, Options, createStrin
22
import { StelleOptions } from "#stelle/decorators";
33

44
import { MessageFlags } from "seyfert/lib/types/index.js";
5-
import { Configuration } from "#stelle/data/Configuration.js";
65

76
const options = {
87
event: createStringOption({
@@ -24,7 +23,6 @@ const options = {
2423
@Declare({
2524
name: "emit",
2625
description: "Emit a event.",
27-
guildId: Configuration.guildIds,
2826
defaultMemberPermissions: ["ManageGuild", "Administrator"],
2927
integrationTypes: ["GuildInstall"],
3028
contexts: ["Guild"],

β€Žsrc/commands/developer/eval.tsβ€Ž

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,41 @@
1-
import { Command, type CommandContext, Declare, Embed, type Message, Options, type WebhookMessage, createStringOption } from "seyfert";
1+
import {
2+
Command,
3+
type CommandContext,
4+
Declare,
5+
Embed,
6+
type Message,
7+
Options,
8+
type WebhookMessage,
9+
createIntegerOption,
10+
createStringOption,
11+
} from "seyfert";
212
import { EmbedColors, Formatter } from "seyfert/lib/common/index.js";
313
import { StelleOptions } from "#stelle/decorators";
414

5-
import { Configuration } from "#stelle/data/Configuration.js";
615
import { getDepth, sliceText } from "#stelle/utils/functions/utils.js";
716

817
import { DeclareParserConfig, ParserRecommendedConfig, Watch, Yuna } from "yunaforseyfert";
9-
import { SECRETS_MESSAGES, SECRETS_REGEX } from "#stelle/data/Constants.js";
18+
import { SECRETS_MESSAGES } from "#stelle/data/Constants.js";
1019
import { ms } from "#stelle/utils/TimeFormat.js";
1120

21+
const secretsRegex = /\b(?:client\.(?:config)|config|env|process\.(?:env|exit)|eval|atob|btoa)\b/;
22+
const concatRegex = /".*?"\s*\+\s*".*?"(?:\s*\+\s*".*?")*/;
23+
1224
const options = {
1325
code: createStringOption({
1426
description: "Enter some code.",
1527
required: true,
1628
}),
29+
depth: createIntegerOption({
30+
description: "Enter the depth of the result.",
31+
min_value: 0,
32+
}),
1733
};
1834

1935
@Declare({
2036
name: "eval",
2137
description: "Eval code with Stelle.",
2238
aliases: ["code"],
23-
guildId: Configuration.guildIds,
2439
defaultMemberPermissions: ["ManageGuild", "Administrator"],
2540
integrationTypes: ["GuildInstall"],
2641
contexts: ["Guild"],
@@ -53,6 +68,7 @@ export default class EvalCommand extends Command {
5368
const { client, options, author, channelId } = ctx;
5469

5570
const start = Date.now();
71+
const depth = options.depth;
5672

5773
let code: string = options.code;
5874
let output: string | null = null;
@@ -71,15 +87,14 @@ export default class EvalCommand extends Command {
7187
});
7288

7389
try {
74-
const concatText = /".*?"\s*\+\s*".*?"(?:\s*\+\s*".*?")*/;
75-
if (SECRETS_REGEX.test(code.toLowerCase()) || concatText.test(code.toLowerCase()))
90+
if (secretsRegex.test(code.toLowerCase()) || concatRegex.test(code.toLowerCase()))
7691
output = SECRETS_MESSAGES[Math.floor(Math.random() * SECRETS_MESSAGES.length)];
7792
else if (typeof output !== "string") {
7893
if (/^(?:\(?)\s*await\b/.test(code.toLowerCase())) code = `(async () => ${code})()`;
7994

8095
output = await eval(code);
8196
typecode = typeof output;
82-
output = getDepth(output).replaceAll(process.env.TOKEN!, client.token);
97+
output = getDepth(output, depth).replaceAll(process.env.TOKEN!, "🌟").replace(process.env.DATABASE_URL!, "🌟");
8398
}
8499

85100
await ctx.editOrReply({

β€Žsrc/commands/developer/reload.tsβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import { Command, type CommandContext, Declare } from "seyfert";
22
import { StelleOptions } from "#stelle/decorators";
33

44
import { EmbedColors } from "seyfert/lib/common/index.js";
5-
import { Configuration } from "#stelle/data/Configuration.js";
65

76
@Declare({
87
name: "reload",
98
description: "Reload Stelle.",
10-
guildId: Configuration.guildIds,
119
defaultMemberPermissions: ["ManageGuild", "Administrator"],
1210
integrationTypes: ["GuildInstall"],
1311
contexts: ["Guild"],

β€Žsrc/commands/user/help.tsβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ export default class HelpCommand extends Command {
126126
return;
127127
}
128128

129-
const command = client.commands!.values.find((command) => command.name === options.command) as Command | undefined;
129+
const command = client.commands!.values.filter((command) => !command.guildId).find((command) => command.name === options.command) as
130+
| Command
131+
| undefined;
130132
if (!command)
131133
return ctx.editOrReply({
132134
flags: MessageFlags.Ephemeral,

0 commit comments

Comments
Β (0)