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