0

I have a project that includes me using some SQL, I am wondering how can I call a function in the DB file?

class testing_db(commands.Cog):
    def __init__(self, bot):
        self.bot=bot
    async def create_db_pool():
        conn = await asyncpg.create_pool(database="db", user="user", host="nunyabusiness", password=DB_PW)



    async def get_account_id(other_id):
       mhm = "Do whatever I do here (I know how to do it but not call it from another file)"






    loop.run_until_complete(create_db_pool())

def setup(bot):
    bot.add_cog(testing_db(bot))

0 Answers0