L
L
Lukas Tumas2021-06-27 20:48:13
Python
Lukas Tumas, 2021-06-27 20:48:13

Fetch_member in a function?

@tasks.loop(seconds=10)
async def check_bans():
    #for value in sql.execute("SELECT * FROM bans"):
        #mem = await ctx.guild.fetch_member(value[0])
        print("Ds")

#check_bans.start()


How to fetch_member without ctx?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Endora Blackwell, 2021-06-27
@Lubitelok

You can use bot.get_guild(id)
If you have cogs, then do it in the class and there alreadyself.bot.get_guild(id)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question