(interaction, options)
| 312 | } |
| 313 | |
| 314 | static async universalReply(interaction, options) { |
| 315 | const coordinator = this.getCoordinator(interaction); |
| 316 | if (coordinator?.isUsageFinalized()) { |
| 317 | return false; |
| 318 | } |
| 319 | |
| 320 | if (interaction._isPrefixCommand) { |
| 321 | if (coordinator?.hasResponded()) { |
| 322 | return await coordinator.edit(sanitizeEditReplyOptions(options)); |
| 323 | } |
| 324 | return await coordinator?.respond(options) ?? this.safeReply(interaction, options); |
| 325 | } |
| 326 | |
| 327 | const isReady = await this.ensureReady(interaction, options.flags ? { flags: options.flags } : {}); |
| 328 | if (!isReady) { |
| 329 | return false; |
| 330 | } |
| 331 | |
| 332 | if (interaction.deferred) { |
| 333 | return await this.safeEditReply(interaction, options); |
| 334 | } |
| 335 | |
| 336 | return await this.safeReply(interaction, options); |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | export function withSafeExecuteDecorator(target, propertyName, descriptor) { |
no test coverage detected