test(open-protocol): remove leftover slash assertion and formatting diff for PR

This commit is contained in:
Dr1mH4X committed 2026-11-15 12:20:00 +08:00
1 parent 69b311283a
commit 066f12d91f
3 files changed
+3 -10

No files matched your search

+1 -5
View File
@@ -1,9 +1,5 @@
import { describe, it, expect } from "vitest";
import {
parseCommand,
canRunCommand,
isAdminCommand,
} from "./commands.js";
import { parseCommand, canRunCommand, isAdminCommand } from "./commands.js";
describe("Command Parser", () => {
it("parses simple command", () => {
+1 -4
View File
@@ -1950,15 +1950,12 @@ describe("BotInstance trackEnd — stale playback sessions", () => {
});
describe("BotInstance — OpenProtocol & command routing", () => {
it("ignores / commands when commandPrefix is '!' and routes private replies to invokerId", async () => {
it("routes private DM command replies to invokerId and channel replies to the channel", async () => {
const ctx = makeGateCtx({ adminGroups: [] });
ctx.executeCommand = vi.fn(async (parsed: { name: string; args: string }) =>
`ok:${parsed.name}:${parsed.args}`,
);
await handleTextMessage.call(ctx, makeMsg("/play 晴天"));
expect(ctx.executeCommand).not.toHaveBeenCalled();
const dm: TS3TextMessage = {
invokerName: "FlSpeakUser",
invokerId: "12",
+1 -1
View File
@@ -826,7 +826,7 @@ export class BotInstance extends EventEmitter {
const parsed = parseCommand(
msg.message,
this.config.commandPrefix,
this.config.commandAliases,
this.config.commandAliases
);
if (!parsed) return;