.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("тут твой токен")
как это исправить ? может добавить потоки?
при написании команды /lastmap <ссылка> он запоминал ссылку и выводил её при написании команды /map
The target parameter should either be a Member or a Role that belongs to guild.
init_second(bot) вызывается один раз, после того как бот создан, и НЕ внутри обработчика событий, а снаружи. Она просто добавляет обработчики из своего файла к боту, вот и всё. Посмотри пример повнимательнее.