diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts index d79f9624..b3fc76f4 100644 --- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts +++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts @@ -88,7 +88,7 @@ export async function applyRoleButtons( candidateMessage = await channel.send(configItem.message.content as string | MessageOptions); } catch (err) { pluginData.getPlugin(LogsPlugin).logBotAlert({ - body: `Error while posting message for role_buttons/${configItem.name}`, + body: `Error while posting message for role_buttons/${configItem.name}: ${String(err)}`, }); return null; } @@ -99,14 +99,19 @@ export async function applyRoleButtons( if (message.author.id !== pluginData.client.user?.id) { pluginData.getPlugin(LogsPlugin).logBotAlert({ - body: `Error applying role buttons for role_buttons/${configItem.name}: target message must be posted by the bot`, + body: `Error applying role buttons for role_buttons/${configItem.name}: target message must be posted by Zeppelin`, }); return null; } // Apply role buttons const components = createButtonComponents(configItem); - await message.edit({ components }); + await message.edit({ components }).catch((err) => { + pluginData.getPlugin(LogsPlugin).logBotAlert({ + body: `Error applying role buttons for role_buttons/${configItem.name}: ${String(err)}`, + }); + return null; + }); return { channel_id: message.channelId,