(client, guildId)
| 385 | } |
| 386 | |
| 387 | export async function getConfiguration(client, guildId) { |
| 388 | try { |
| 389 | if (!client || !client.db) { |
| 390 | throw new TitanBotError( |
| 391 | 'Database service not available', |
| 392 | ErrorTypes.DATABASE, |
| 393 | 'Database service is currently unavailable. Please try again later.' |
| 394 | ); |
| 395 | } |
| 396 | |
| 397 | return await getJoinToCreateConfig(client, guildId); |
| 398 | |
| 399 | } catch (error) { |
| 400 | if (error instanceof TitanBotError) { |
| 401 | throw error; |
| 402 | } |
| 403 | throw new TitanBotError( |
| 404 | `Failed to retrieve configuration: ${error.message}`, |
| 405 | ErrorTypes.DATABASE, |
| 406 | 'Failed to retrieve settings.' |
| 407 | ); |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | export async function isTriggerChannel(client, guildId, channelId) { |
| 412 | try { |
no test coverage detected