almeidx / discord-ban-sync

Sync bans across multiple Discord servers
Apache License 2.0
6 stars 5 forks source link

bans not always pushing through #160

Closed shadowgamingyt closed 1 year ago

shadowgamingyt commented 1 year ago

So if i ban someone it pushes through but if i ban someone else within like a hour or a bit more from the first ban the new ban is not synced at all. ive tried reinstalling the bot re setting it up making a new bot etc nothing changes and ive been wondering if you have any tips on how to fix it

almeidx commented 1 year ago

Are you sure you are not running an older version of the bot? This issue was fixed in a more recent version, around July 17th. (After redownloading the code, you have to reinstall the dependencies (pnpm i) and rebuild it by running these commands in the README)

shadowgamingyt commented 1 year ago

ill try reinstalling it again

shadowgamingyt commented 1 year ago

no it throws this error in the longs i normally have it running via cron so i never get to see these errors

[2023-08-01 23:06:26] ERROR: Invalid Form Body delete_message_seconds[NUMBER_TYPE_MAX]: int value should be less than or equal to 604800. err: { "type": "DiscordAPIError", "message": "Invalid Form Body\ndelete_message_seconds[NUMBER_TYPE_MAX]: int value should be less than or equal to 604800.", "stack": DiscordAPIError[50035]: Invalid Form Body delete_message_seconds[NUMBER_TYPE_MAX]: int value should be less than or equal to 604800. at handleErrors (/root/discord-ban-sync/node_modules/.pnpm/@discordjs+rest@1.7.1/node_modules/@discordjs/rest/src/lib/handlers/Shared.ts:152:10) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at SequentialHandler.runRequest (/root/discord-ban-sync/node_modules/.pnpm/@discordjs+rest@1.7.1/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:399:20) at SequentialHandler.queueRequest (/root/discord-ban-sync/node_modules/.pnpm/@discordjs+rest@1.7.1/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:169:11) at REST.request (/root/discord-ban-sync/node_modules/.pnpm/@discordjs+rest@1.7.1/node_modules/@discordjs/rest/src/lib/REST.ts:343:20) at async GuildBanManager.create (/root/discord-ban-sync/node_modules/.pnpm/discord.js@14.11.0/node_modules/discord.js/src/managers/GuildBanManager.js:169:5) at BanQueue.#banUser (/root/discord-ban-sync/src/structures/banQueue.ts:120:4) at BanQueue.#processQueue (/root/discord-ban-sync/src/structures/banQueue.ts:76:22) "requestBody": { "json": { "delete_message_seconds": 1440000000 } }, "rawError": { "type": "Object", "message": "Invalid Form Body", "stack":

    "code": 50035,
    "errors": {
      "delete_message_seconds": {
        "_errors": [
          {
            "code": "NUMBER_TYPE_MAX",
            "message": "int value should be less than or equal to 604800."
          }
        ]
      }
    }
  },
  "code": 50035,
  "status": 400,
  "method": "PUT",
  "url": "https://discord.com/api/v10/guilds/1079879376558100490/bans/823631422514004028"
}

[2023-08-01 23:06:26] INFO: Processed 0 actions for 823631422514004028

shadowgamingyt commented 1 year ago

NVM reinstall fixed it it did not like 1 as a delete ammount. we are good