master #16

Merged
kibi merged 2 commits from master into f0ckv2 2026-07-17 22:23:15 +00:00
2 changed files with 21 additions and 14 deletions
Showing only changes of commit 98c8b8d097 - Show all commits

View File

@@ -1,4 +1,5 @@
import { getLevel } from "../admin.mjs"; import { getLevel } from "../admin.mjs";
import cfg from "../config.mjs";
export default async self => { export default async self => {
return [{ return [{
@@ -45,10 +46,11 @@ export default async self => {
// Deduplicate and sort // Deduplicate and sort
const uniqueCommands = [...new Set(availableCommands)].sort(); const uniqueCommands = [...new Set(availableCommands)].sort();
const trigger = cfg.main.trigger || "!w";
if (uniqueCommands.length === 0) { if (uniqueCommands.length === 0) {
availableCommands.push(e.type === 'matrix' ? "!w -sfw/nsfw -t tag1,tag2,tag3" : "!w <url> or attachment"); availableCommands.push(e.type === 'matrix' ? `${trigger} -sfw/nsfw -t tag1,tag2,tag3` : `${trigger} <url> or attachment`);
} else { } else {
availableCommands.push(e.type === 'matrix' ? "!w -sfw/nsfw -t tag1,tag2,tag3" : "!w <url> or attachment"); availableCommands.push(e.type === 'matrix' ? `${trigger} -sfw/nsfw -t tag1,tag2,tag3` : `${trigger} <url> or attachment`);
} }
// Re-sort to include manually added command // Re-sort to include manually added command