(interaction, config, client)
| 11 | category: 'Fun', |
| 12 | |
| 13 | async execute(interaction, config, client) { |
| 14 | try { |
| 15 | const result = Math.random() < 0.5 ? "Heads" : "Tails"; |
| 16 | const emoji = result === "Heads" ? "🪙" : "🔮"; |
| 17 | |
| 18 | const embed = successEmbed( |
| 19 | "Heads or Tails?", |
| 20 | `The coin landed on... **${result}** ${emoji}!`, |
| 21 | ); |
| 22 | |
| 23 | await InteractionHelper.safeReply(interaction, { embeds: [embed] }); |
| 24 | logger.debug(`Flip command executed by user ${interaction.user.id} in guild ${interaction.guildId}`); |
| 25 | } catch (error) { |
| 26 | logger.error('Flip command error:', error); |
| 27 | await handleInteractionError(interaction, error, { |
| 28 | commandName: 'flip', |
| 29 | source: 'flip_command' |
| 30 | }); |
| 31 | } |
| 32 | }, |
| 33 | }; |
nothing calls this directly
no test coverage detected