Tags: add separate list permission for !tag list

This commit is contained in:
Dragory 2019-02-09 13:17:59 +02:00
parent b4127a0fd8
commit 0a4a167c9d

View file

@ -35,14 +35,16 @@ export class TagsPlugin extends Plugin {
permissions: { permissions: {
create: false, create: false,
use: true use: true,
list: false
}, },
overrides: [ overrides: [
{ {
level: ">=50", level: ">=50",
permissions: { permissions: {
create: true create: true,
list: true
} }
} }
] ]
@ -66,7 +68,7 @@ export class TagsPlugin extends Plugin {
} }
@d.command("tag list") @d.command("tag list")
@d.permission("create") @d.permission("list")
async tagListCmd(msg: Message) { async tagListCmd(msg: Message) {
const tags = await this.tags.all(); const tags = await this.tags.all();
if (tags.length === 0) { if (tags.length === 0) {