YEP event spawner (despawn question)

My game involves planting a seed where ever the player is facing. I'm using Yanfly's event spawner to spawn the growing crop on that spot. I want the whole crop event to despawn after harvest, however, I don't see how to grab "this event" to despawn. The help file shows how to despawn the last spawned event or first spawned event but i want it to despawn THIS event if that makes any sense. Thank you all for the help.
I'm no JavaScript genius, I mean I know very little about its code, but I actually managed to solve this problem by looking at the plugin code! (Not as in "just" looking at the code.) Simply insert this script in the spawned event:

Yanfly.DespawnEventID(this._eventId)

and you're good to go!

Original thread: https://forums.rpgmakerweb.com/threads/yep-event-spawner-despawn-question.120293/