How can I give myself certain potions via commands?

Solution 1:

To give a custom potion to a player you can use the command:

/give <selector> minecraft:potion{CustomPotionEffects:[{Id:<id>,Duration:<duration>}],Potion:"minecraft:water"}

Replace <selector> with whatever you are giving it to, <id> with the numerical ID for what you want, and <duration> with the duration in ticks. See here for a list of potion IDs.

If you want multiple effects on one potion you can duplicate {Id:<id>,Duration:<duration>} within its list multiple times, separated with commas.

Solution 2:

If you're fine with using vanilla potions you can use this site to generate the command for you: https://www.digminecraft.com/generators/give_potion.php