def on_ready():
print('-----')
print('User :: {}'.format(sparcli.user))
print('ID :: {}'.format(sparcli.user.id))
print('-----')
# Load the extentions
for extension in initialExtentions:
# This is necessary because I'm bad at code lol
try:
sparcli.load_extension(extension)
# Print out any errors
except Exception as e:
exc = '{}: {}'.format(type(e).__name__, e)
print('Failed to load extension {}\n{}'.format(extension, exc))
# Load up any changes that would have been made to the configs
for server in sparcli.servers:
z = getServerJson(server.id)
z = fixJson(z)
saveServerJson(server.id, z)
# Reccursively fix any globals too
z = getServerJson('Globals')
z = fixJson(z)
saveServerJson('Globals', z)
# Changed the bot's game
game = '@Spar.cli help'
await sparcli.change_presence(game=discord.Game(name=game))
评论列表
文章目录