-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
I am creating a thread and intend to send several responses to that newly created thread.
But I can't get the thread ID, even though the code successfully creates the thread.
Is there something I'm doing wrong? Or is it an unavailable function?
def discord(media_path, name):
body = "Puedes apoyarme"
try:
webhook = DiscordWebhook(url=config['discord']['webhook_thread'], content=body, thread_name=f"Pestañas de la Tienda del dia: {kasstime}")
temp_image_path = f"{name}_discord_resized.jpg"
resize_image_discord(media_path, temp_image_path)
with open(temp_image_path, "rb") as shopImage:
webhook.add_file(file=shopImage.read(), filename='tienda.jpg')
response = webhook.execute()
print("Enviado con Éxito a Discord")
print(webhook)
print(webhook.thread_id)
return webhook.thread_id
except Exception as e:
print(f"Error al enviar la tienda de objetos a Discord, {e}")
return NoneEnviado con Éxito a Discord
<discord_webhook.webhook.DiscordWebhook object at 0x106d9b500>
None
Metadata
Metadata
Assignees
Labels
No labels