mirror of
https://github.com/Xtao-Labs/iShotaBot.git
synced 2024-11-16 12:51:38 +00:00
14 lines
318 B
Python
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
|