Reputation: 29
Message= await webhook.send("Test message to pin")
await Message.pin()
But I get a str in return from webhook.send. How can I get a message type so I'm able to pin it? Thank you in advance.
Upvotes: 0
Views: 415
Reputation: 1173
If you read the documentation. You will see that you need to add the following parameter: wait=True
(when sending through a webhook). This will return the message. If you dont do this it will return None as explained in the doc.
Thus what you need to do:
Message = await webhook.send("Test message to pin", wait=True)
await Message.pin()
Upvotes: 1