zmoin / slapBot

a bot that slaps people on discord
1 stars 1 forks source link

.slap command mentions sometimes has issues when slapping a user with another user. #11

Closed HeikaHaku closed 5 years ago

HeikaHaku commented 5 years ago

Using .slap with two mentions sometimes causes it to use one for both slappee and slapper. Given that the .first() method uses an iterator behind the scenes, might be best to use something else.

The data structure being used has an .array() method, so it might be best to use that instead to get the array of mentions, and work from there.

I tested it locally, the array method is really messy, and not a viable solution.

Edit: Haven't tested it too thoroughly, but what you've done seems to be a good solution. So this can probably be marked as closed now.