Final fixes
This commit is contained in:
parent
8a2d4e6669
commit
3730691ba2
2 changed files with 2 additions and 4 deletions
|
@ -16,8 +16,6 @@ services:
|
|||
environment:
|
||||
OUTPUT: /home/esmBot/help
|
||||
TEMPDIR: /home/esmBot/temp
|
||||
|
||||
MONGO: mongodb://mongo:27017/esmBot
|
||||
# chrome remote debugger can only be accessed over localhost or IP
|
||||
CHROME: 172.20.0.4:9222
|
||||
links:
|
||||
|
|
|
@ -30,9 +30,9 @@ const Global = mongoose.model("Global", globalSchema);
|
|||
for (const guild of guilds) {
|
||||
console.log(guild.tagsDisabled);
|
||||
if ((await pool.query("SELECT * FROM guilds WHERE guild_id = $1", [guild.id])).rows.length !== 0) {
|
||||
await pool.query("UPDATE guilds SET tags = $1, prefix = $2, warns = $3, disabled = $4, tags_disabled = $5 WHERE guild_id = $6", [guild.tags, guild.prefix, {}, guild.disabled ? guild.disabled : guild.disabledChannels, guild.tagsDisabled === undefined ? false : guild.tagsDisabled, guild.id]);
|
||||
await pool.query("UPDATE guilds SET tags = $1, prefix = $2, warns = $3, disabled = $4, tags_disabled = $5 WHERE guild_id = $6", [guild.tags, guild.prefix.substring(0, 15), {}, guild.disabled ? guild.disabled : guild.disabledChannels, guild.tagsDisabled === undefined ? false : guild.tagsDisabled, guild.id]);
|
||||
} else {
|
||||
await pool.query("INSERT INTO guilds (guild_id, tags, prefix, warns, disabled, tags_disabled) VALUES ($1, $2, $3, $4, $5, $6)", [guild.id, guild.tags, guild.prefix, {}, guild.disabled ? guild.disabled : guild.disabledChannels, guild.tagsDisabled === undefined ? false : guild.tagsDisabled]);
|
||||
await pool.query("INSERT INTO guilds (guild_id, tags, prefix, warns, disabled, tags_disabled) VALUES ($1, $2, $3, $4, $5, $6)", [guild.id, guild.tags, guild.prefix.substring(0, 15), {}, guild.disabled ? guild.disabled : guild.disabledChannels, guild.tagsDisabled === undefined ? false : guild.tagsDisabled]);
|
||||
}
|
||||
console.log(`Migrated guild with ID ${guild.id}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue