def on_ready():
"""
Event handler, fires when the bot has connected and is logged in
"""
logging.info('Logged in as ' + client.user.name + " (" + client.user.id + ")")
# Change nickname to nickname in configuration
for instance in client.servers:
await client.change_nickname(instance.me, pm.botPreferences.nickName)
# Load rank bindings
pm.botPreferences.bind_roles(instance.id)
await client.change_presence(game=discord.Game(name='Use ' + pm.botPreferences.commandPrefix + 'help for help'))
await pm.handle_loop()
评论列表
文章目录