Add room-scoped Matrix plugins and bilingual configuration commands

This commit is contained in:
eskima committed 2026-11-20 23:29:33 +08:00
1 parent 061bfbd12a
commit 8a87c893fd
75 files changed
+2559 -1975

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
const description = { 'zh-CN': '问候示例', en: 'Greeting example' };
exports.default = {
apiVersion: 1,
id: 'greeting',
aliases: ['问候'],
version: '1.0.0',
description,
validate(config) { return config; },
create(ctx) {
return {
commands: [{
id: 'greeting.send',
paths: [['greet'], ['问候']],
description,
usage: { 'zh-CN': '!问候 <名字>', en: '!greet <name>' },
async run({ message, args }) {
await ctx.reply(message, ctx.t({ 'zh-CN': '你好,{name}!', en: 'Hello, {name}!' },
{ name: args.join(' ') || 'World' }));
},
}],
};
},
};