Fix a bunch of linter errors
diff --git a/ClicksMigratingProblems/index.js b/ClicksMigratingProblems/index.js
index b79146c..a9132f8 100644
--- a/ClicksMigratingProblems/index.js
+++ b/ClicksMigratingProblems/index.js
@@ -29,104 +29,131 @@
}
// Convert to the new format
const newData = {
- "id": data.guild_info.id.toString(),
- "version": 1,
- "singleEventNotifications": {
- "statsChannelDeleted": false
+ id: data.guild_info.id.toString(),
+ version: 1,
+ singleEventNotifications: {
+ statsChannelDeleted: false
},
- "filters": {
- "images": {
- "NSFW": !data.images.nsfw,
- "size": data.images.toosmall
+ filters: {
+ images: {
+ NSFW: !data.images.nsfw,
+ size: data.images.toosmall
},
- "wordFilter": {
- "enabled": true,
- "words": {
- "strict": data.wordfilter.strict,
- "loose": data.wordfilter.soft
+ wordFilter: {
+ enabled: true,
+ words: {
+ strict: data.wordfilter.strict,
+ loose: data.wordfilter.soft
}
},
- "invite": {
- "enabled": data.invite ? data.invite.enabled : false,
- "channels": data.invite ? data.invite.whitelist.channels.map(channel => channel.toString()) : []
+ invite: {
+ enabled: data.invite ? data.invite.enabled : false,
+ channels: data.invite
+ ? data.invite.whitelist.channels.map((channel) =>
+ channel.toString()
+ )
+ : []
},
- "pings": {
- "mass": 5,
- "everyone": true,
- "roles": true
+ pings: {
+ mass: 5,
+ everyone: true,
+ roles: true
}
},
- "welcome": {
- "enabled": data.welcome ? (data.welcome.message.text !== null) : false,
- "verificationRequired": {
- "message": null,
- "role": null
+ welcome: {
+ enabled: data.welcome ? data.welcome.message.text !== null : false,
+ verificationRequired: {
+ message: null,
+ role: null
},
- "role": data.welcome ? (data.welcome.role !== null ? data.welcome.role.toString() : null) : null,
- "channel": data.welcome ? (data.welcome.message.text !== null ? data.welcome.message.channel.toString() : null) : null,
- "message": data.welcome ? (data.welcome.message.text) : null
+ role: data.welcome
+ ? data.welcome.role !== null
+ ? data.welcome.role.toString()
+ : null
+ : null,
+ channel: data.welcome
+ ? data.welcome.message.text !== null
+ ? data.welcome.message.channel.toString()
+ : null
+ : null,
+ message: data.welcome ? data.welcome.message.text : null
},
- "stats": {},
- "logging": {
- "logs": {
- "enabled": true,
- "channel": data.log_info.log_channel ? data.log_info.log_channel.toString() : null,
- "toLog": "3fffff"
+ stats: {},
+ logging: {
+ logs: {
+ enabled: true,
+ channel: data.log_info.log_channel
+ ? data.log_info.log_channel.toString()
+ : null,
+ toLog: "3fffff"
},
- "staff": {
- "channel": data.log_info.staff ? data.log_info.staff.toString() : null
+ staff: {
+ channel: data.log_info.staff
+ ? data.log_info.staff.toString()
+ : null
}
},
- "verify": {
- "enabled": data.verify_role !== null,
- "role": data.verify_role ? data.verify_role.toString() : null
+ verify: {
+ enabled: data.verify_role !== null,
+ role: data.verify_role ? data.verify_role.toString() : null
},
- "tickets": {
- "enabled": data.modmail ? (data.modmail.cat !== null) : null,
- "category": data.modmail ? (data.modmail.cat !== null ? data.modmail.cat.toString() : null) : null,
- "types": "3f",
- "customTypes": null,
- "supportRole": data.modmail ? (data.modmail.mention !== null ? data.modmail.mention.toString() : null) : null,
- "maxTickets": data.modmail ? (data.modmail.max) : 5
+ tickets: {
+ enabled: data.modmail ? data.modmail.cat !== null : null,
+ category: data.modmail
+ ? data.modmail.cat !== null
+ ? data.modmail.cat.toString()
+ : null
+ : null,
+ types: "3f",
+ customTypes: null,
+ supportRole: data.modmail
+ ? data.modmail.mention !== null
+ ? data.modmail.mention.toString()
+ : null
+ : null,
+ maxTickets: data.modmail ? data.modmail.max : 5
},
- "moderation": {
- "mute": {
- "timeout": true,
- "role": null,
- "text": null,
- "link": null
+ moderation: {
+ mute: {
+ timeout: true,
+ role: null,
+ text: null,
+ link: null
},
- "kick": {
- "text": null,
- "link": null
+ kick: {
+ text: null,
+ link: null
},
- "ban": {
- "text": null,
- "link": null
+ ban: {
+ text: null,
+ link: null
},
- "softban": {
- "text": null,
- "link": null
+ softban: {
+ text: null,
+ link: null
},
- "warn": {
- "text": null,
- "link": null
+ warn: {
+ text: null,
+ link: null
},
- "role": {
- "role": null
+ role: {
+ role: null
}
},
- "tracks": [],
- "roleMenu": [],
- "tags": data.tags
+ tracks: [],
+ roleMenu: [],
+ tags: data.tags
};
// Insert the new data into the database
- await collection.updateOne({ id: data.guild_info.id.toString() }, { $set: newData }, { upsert: true });
+ await collection.updateOne(
+ { id: data.guild_info.id.toString() },
+ { $set: newData },
+ { upsert: true }
+ );
// Delete the old file
fs.unlinkSync(`./oldData/${file}`);
console.log(`└ Successfully migrated file ${file}`);
x++;
}
-
// console.log((await collection.findOne({ id: "your mother" })));