How to swap tokens on pancakeswap

How can I use the write contract in moralis
when I do Moralis.executeFunction it says only for read functions

so how do I swap 1 token for another token on pancakeswap?

I dont want to use the 1inch plugin

You need to interact Pancakeswap’s liquidty pair address i guess…