Renommage types any et fix /crack
This commit is contained in:
		| @@ -28,14 +28,14 @@ export default { | ||||
| 			for (let i = 0; i < games.length; i++) await message.react(emojis[i]) | ||||
| 			 | ||||
| 			// Wait for a reaction to be added by the interaction author. | ||||
| 			const filter: any = (reaction: MessageReaction, user: User) => { if (reaction.emoji.name) return emojis.includes(reaction.emoji.name) && user.id === interaction.user.id } | ||||
| 			const filter = (reaction: MessageReaction, user: User) => { if (reaction.emoji.name) { return emojis.includes(reaction.emoji.name) && user.id === interaction.user.id } return false } | ||||
| 			await message.awaitReactions({ filter, max: 1, time: 5000, errors: ['time'] }).then(collected => { | ||||
| 				console.log(collected) | ||||
| 				if (!collected.first) return | ||||
| 				let reaction = collected.first() | ||||
| 				let index = emojis.indexOf(reaction?.emoji.name ?? '') | ||||
| 				game = games[index] | ||||
| 			}).catch(() => { return interaction.followUp({ content: 'T\'as mis trop de temps à choisir !' }) }) | ||||
| 			}).catch(() => { return interaction.followUp({ content: "T'as mis trop de temps à choisir !" }) }) | ||||
| 		} | ||||
| 		else game = games[0] | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user