mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 22:27:44 +02:00
Fix blacklist export
This commit is contained in:
@@ -85,12 +85,12 @@ module.exports = class XiaoClient extends CommandoClient {
|
|||||||
text += `"${id}",`;
|
text += `"${id}",`;
|
||||||
}
|
}
|
||||||
text = text.slice(0, -1);
|
text = text.slice(0, -1);
|
||||||
text += '\n ]\n },\n "user": [\n ';
|
text += '\n ],\n "user": [\n ';
|
||||||
for (const id of this.blacklist.user) {
|
for (const id of this.blacklist.user) {
|
||||||
text += `"${id}",`;
|
text += `"${id}",`;
|
||||||
}
|
}
|
||||||
text = text.slice(0, -1);
|
text = text.slice(0, -1);
|
||||||
text += '\n ]\n }\n}\n';
|
text += '\n ]\n}\n';
|
||||||
const buf = Buffer.from(text);
|
const buf = Buffer.from(text);
|
||||||
fs.writeFileSync(path.join(__dirname, '..', 'blacklist.json'), buf, { encoding: 'utf8' });
|
fs.writeFileSync(path.join(__dirname, '..', 'blacklist.json'), buf, { encoding: 'utf8' });
|
||||||
return buf;
|
return buf;
|
||||||
|
|||||||
Reference in New Issue
Block a user