def build(): """ Execute build tasks. """ virtualenv.build() app.build() db.build()
await db.write("INSERT INTO prefixes (guild_id) VALUES (?)", (guild.id,)) channel = guild.system_channel if channel is not None: await channel.send('Hide yo wife, hide yo kids. Diddly Kong is here!') ##only default command is ping @bot.command(aliases=['latency']) async def ping(ctx): await ctx.send(f'{round(bot.latency*1000)} ms') @bot.command() @commands.is_owner() async def shutdown(ctx): print("closing spotify connection") await ctx.bot.spy_client.close_client() print("Logging out") await ctx.bot.logout() print("DONE") bot.add_check(checks.bot_channel_only) if __name__ == '__main__': for extension in initial_extensions: bot.load_extension(extension) with open("token.txt", "r") as token_file: token = token_file.read() bot.loop.create_task(db.build()) bot.run(token)
def build(): """Execute build taks for all components.""" virtualenv.build() db.build()
def test(): """Run tests.""" db.drop(db_name='test_app', warn=False) db.build(db_name='test_app', config='test') app.test() db.drop(db_name='test_app', warn=False)
def build(): """Execute build tasks for all components.""" virtualenv.build() db.build()