I need to use discord.py regardless of the events inside my program, and specifically get the user's id by his nickname (they are all on the same server).  bot.loop.create_task doesn't work for me, as it needs to start an event loop and my program is not related to event handling.
I will be glad to any of your help
In theory there is no way, because discord.py is asynchronous.
In practice...
you can try discord.ext.tasks and setup something that looks like a chron task.
How to use discord.py regardless of events?