I had my Motorola Moto e5 Play phone in my bag, and a bit of chocolate melted into the headphone jack. I tried to use tape on the end of a toothpick, but it didn't work. I need my headphones to chat to my mates. Anybody's help would be fine. Thanks
Instead of heating the chocolate and hoping to get it out, you should cool it down.
To avoid any damage to your phone and the battery, completely switch it off. Then put it into the lowest compartment of a fridge (where it's coolest) for 30 minutes or into a freezer for 5 minutes. This sets up the molten chocolate.
Take your phone out and hold it with the headphone jack pointing down. Start picking at the hardened chocolate with a toothpick and let the crumbles fall down. Suction from a vacuum cleaner can help you remove the last remnants.
If the cleaning takes so long that the remaining chocolate starts getting tacky again, put it back into the fridge for a few minutes.
Let your phone warm up for 10 - 20 minutes after the cleaning is finished before you switch it back on or move it into moist areas (the moisture could condense inside your phone if it's still too chilly).
A combination of gentle heat (hair dryer on low or medium, perhaps), followed immediately by suction (from the smallest nozzle you have for a vacuum cleaner, or ideally a keyboard cleaning attachment or similar) may get enough of the chocolate out to allow the headphone jack to function as it should.
If not, don't try sticking things inside to clean it; just take the phone to a repair shop and ask for an estimate, then decide whether it's worth repairing or needs replacing.
The best option to avoid damage to the phone is to take it to a repair shop.
Using heat + suction is a good advice, as given in the answer from @ZeissIkon.
Additionally, you may try using cotton swabs (the ones used for cleaning ear canals). Of course, the cotton swab must be small enough to enter the hole in the phone. Use it as a brush, to clean the chocolate. You can use this option in addition to heat - the melted chocolate will be absorbed by the cotton.
You might have some additional success if you use some solvent to dissolve the chocolate: spray for electrical contacts, WD40, alcohol. Apply the solvent on the cotton swab (not inside the phone), and then clean inside. There should be no excess of solvent on the cotton swab when you insert it into the phone.
NOTE: DO NOT KEEP THE PHONE WITH THE HOLE UPWARDS WHEN APPLYING HEAT!! All the chocolate will go deeper inside the phone.
Even if it is uncomfortable, keep the phone up with the hole downwards. This will help any chocolate / solvent / dirt come out of the phone, gravitationally.
Note: if possible, remove the battery from the phone before attempting the cleaning. Just in case.