OutwalkStudios / discord-backup

a module for backing up and restoring discord servers.
MIT License
11 stars 10 forks source link

Bitrates are referenced incorrectly #7

Closed SCDerox closed 1 year ago

SCDerox commented 1 year ago

https://github.com/OutwalkStudios/discord-backup/blob/debfa4a01211883ba4e152f39d24c483e0bc1bd8/src/utils.js#L12-L17 Here, the old discord.js v13 format[^1] is being used, instead of the new v14 format[^2]. This can cause the the load function to fail when trying to restore a backup to a lower-boost-level guild. In the original discord-backup-module this has been migrated already [^3].

I'm happy to fix this in a PR, if you are interested.

[^1]: Old v13 GuildPremium documentation: https://discord.js.org/#/docs/discord.js/v13/typedef/PremiumTier [^2]: v14's GuildPremiumTier documentation: https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildPremiumTier [^3]: See https://github.com/Androz2091/discord-backup/blob/79e9adc72f0ea8d379989439284b58f8c25c8d1b/src/util.ts#L37

jleeson commented 1 year ago

Thanks for creating this issue @SCDerox, If you would like to make the change in a PR, Im more than happy to merge it. Otherwise let me know and I can make the change.

jleeson commented 1 year ago

this fix has been released in v0.4.9