Yves/main.py

25 lines
438 B
Python

import tomllib
import nerimity
import pylast
import bot
with open("config.toml", "rb") as f:
config = tomllib.load(f)
# nerimity client
bot = bot.Bot(
token = config['token'],
prefix = '!',
lastfm_api_key = config['api_key'],
lastfm_api_secret = config['api_secret']
)
bot.load_commands("commands")
@bot.listen("on_ready")
async def on_ready(params):
print(f"Logged in as {bot.account.username}")
bot.run()