import pathlib
import tempfile


def get_tempdir() -> pathlib.Path:
    """Get the temporary directory to be used by genshin.py."""
    tempdir = pathlib.Path(tempfile.gettempdir())
    directory = tempdir / "genshin.py"
    directory.mkdir(exist_ok=True, parents=True)

    return directory