We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2747437 commit 0aae705Copy full SHA for 0aae705
1 file changed
backend/src/plugins/RoleButtons/functions/applyAllRoleButtons.ts
@@ -8,7 +8,8 @@ export async function applyAllRoleButtons(pluginData: GuildPluginData<RoleButton
8
const config = pluginData.config.get();
9
for (const [configName, configItem] of Object.entries(config.buttons)) {
10
// Use the hash of the config to quickly check if we need to update buttons
11
- const hash = createHash("md5").update(JSON.stringify(configItem)).digest("hex");
+ const configItemToHash = { ...configItem, name: configName }; // Add name property for backwards compatibility
12
+ const hash = createHash("md5").update(JSON.stringify(configItemToHash)).digest("hex");
13
const savedButtonsItem = savedRoleButtons.find((bt) => bt.name === configName);
14
if (savedButtonsItem?.hash === hash) {
15
// No changes
0 commit comments