My moped has been running just fine lately but after I put gas in it immediately started choking off when I give it gas. The tank was pretty close to empty when I topped it off. Is that the reason that all of a sudden the moped doesn't run properly?
Your carburettor might have been flooded, the fuel pump(vending machine) has a certain pressure with which it pours in fuel to your tank, your moped being small I am guessing not more that 4 litres of fuel capacity will be a small tank and when you are pretty close to empty or empty the pressure of the fuel coming in can flood your carburettor which will choke for a mile or two after that it should resume working properly.
It is basically like pulling up the choke on your moped , it floods the carb. To avoid such situations always remember to shut off the fuel valve before filling up.
You might have overfilled the tank and sealed it sort of air tight, sometimes(common on olden motorcycles & Mopeds)when you fill up the tank too much and close the lid without any sort of gap in the tank for air , it creates a partial vacuum and the fuel will not be able to freely flow to the carb thus casing it to choke
solution is to open the tank and reseal it slowly allowing some air to get in or remove some fuel.
There is a high chance that you might have put it adulterated or bad fuel in your moped, this will definitely clog the engine part and will cause issues to an otherwise smooth engine.
As your friend suggested, the fuel filter could also be an issue do check it.