iShotaBot/defs/glover.py
2021-11-28 22:55:10 +08:00

14 lines
318 B
Python

from configparser import RawConfigParser
from typing import Union
from distutils.util import strtobool
# [Basic]
ipv6: Union[bool, str] = "False"
config = RawConfigParser()
config.read("config.ini")
ipv6 = config.get("basic", "ipv6", fallback=ipv6)
try:
ipv6 = strtobool(ipv6)
except ValueError:
ipv6 = False