(client, guildId, roleId)
| 1178 | } |
| 1179 | |
| 1180 | export async function deleteApplicationRoleSettings(client, guildId, roleId) { |
| 1181 | try { |
| 1182 | if (!client.db || typeof client.db.delete !== "function") { |
| 1183 | logger.error("Database client is not available for deleteApplicationRoleSettings."); |
| 1184 | return false; |
| 1185 | } |
| 1186 | |
| 1187 | const key = getApplicationRoleSettingsKey(guildId, roleId); |
| 1188 | await client.db.delete(key); |
| 1189 | return true; |
| 1190 | } catch (error) { |
| 1191 | logger.error(`Error deleting application role settings for ${guildId}:${roleId}:`, error); |
| 1192 | return false; |
| 1193 | } |
| 1194 | } |
| 1195 | |
| 1196 | export async function createApplication(client, application) { |
| 1197 | const { guildId, userId } = application; |
no test coverage detected