擅长:python、mysql、java
<pre><code>import yaml
class Hartex(discord.Client):
def __init__(self, *args, **kwargs):
super().__init__()
with open('HarTex/hartexConfig.yaml', 'r') as hartexConfig:
# this is the part where your config is actually parsed
hartexTokenValue = yaml.safe_load(hartexConfig)
hartexToken = hartexTokenValue['general']['hartexToken']
</code></pre>