После отправки сообщения он должен реагировать на них одинаковыми реакциями - все работает .
После реакции он должен создать цепочку собственных сообщений, на которые он отреагировал - снова канал A - поток A, но когда он делает это для канала B, он по какой-то причине создает поток в канале A.
Не знаете, в чем проблема? Я тоже пробовала Элиф.
Код: Выделить всё
if user == reaction.message.author and str(reaction.emoji) == "\U0001F5BC\U0000FE0F":
channel = client.get_channel(1245472750164906084)
# Filter out mention at the start
mention_regex = re.compile(r"^ ")
filtered_content = mention_regex.sub("", reaction.message.content, 1)
print(filtered_content)
message = await channel.send(f"{filtered_content} by {reaction.message.author.mention}")
await message.add_reaction("\U0001F5BC\U0000FE0F")
await reaction.message.channel.create_thread(name=message.content, message=None, auto_archive_duration=1440, reason=None)
if user == reaction.message.author and str(reaction.emoji) == "💰":
channel = client.get_channel(1285915841254395956)
# Filter out mention at the start
mention_regex = re.compile(r"^ ")
filtered_content = mention_regex.sub("", reaction.message.content, 1)
print(filtered_content)
message = await channel.send(f"{filtered_content} by {reaction.message.author.mention}")
await message.add_reaction("💰")
await reaction.message.channel.create_thread(name=message.content, message=None, auto_archive_duration=1440, reason=None)
Подробнее здесь: https://stackoverflow.com/questions/790 ... orrect-pla