.find_closest(x, y, halo=None, start=None)
Returns a singleton tuple containing the object ID of the object closest to point (x, y). If there are no qualifying objects, returns an empty tuple.
Use the halo argument to increase the effective size of the point. For example, halo=5 would treat any object within 5 pixels of (x, y) as overlapping.
If an object ID is passed as the start argument, this method returns the highest qualifying object that is below start in the display list.
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix = ">", intents = discord.Intents.all())
@bot.event
async def on_ready():
print("I am connected!")
bot.run("тут твой токен")