(client, guildId, updates)
| 709 | } |
| 710 | |
| 711 | export async function updateWelcomeConfig(client, guildId, updates) { |
| 712 | try { |
| 713 | const currentConfig = await getWelcomeConfig(client, guildId); |
| 714 | const updatedConfig = { ...currentConfig, ...updates }; |
| 715 | |
| 716 | await saveWelcomeConfig(client, guildId, updatedConfig); |
| 717 | return updatedConfig; |
| 718 | } catch (error) { |
| 719 | logger.error(`Error updating welcome config for guild ${guildId}:`, error); |
| 720 | throw error; |
| 721 | } |
| 722 | } |
| 723 | |
| 724 | export function getLevelingKey(guildId) { |
| 725 | return `guild:${guildId}:leveling:config`; |
no test coverage detected