Add -target.id- on both leave and join variables. That gives the inviter id.
Add -target.username- that gives the inviter username without pinging him.
There also some bugs with the vanity URL, thats gives errors on join and leave messages.
throw error when they join and leave sometimes, or when they join from vanity sometimes they say they joined from someone else, and same happens with leave
Add -target.id- on both leave and join variables. That gives the inviter id. Add -target.username- that gives the inviter username without pinging him.
There also some bugs with the vanity URL, thats gives errors on join and leave messages.