Ability to delete messages sent from a webhook a few days later.
See original GitHub issueI want to delete all the messages I sent with DiscordWebhook but not in the same run as in your example:
from discord_webhook import DiscordWebhook
from time import sleep
webhook = DiscordWebhook(url='your webhook url', content='Webhook Content')
sent_webhook = webhook.execute()
sleep(10)
webhook.delete(sent_webhook)
I would like something like:
from discord_webhook import DiscordWebhook
webhook = DiscordWebhook(url='your webhook url', content='Webhook Content')
sent_webhook = webhook.execute()
sent_webhook .save('sent_webhook .swh')
And then a few days later, the following imaginary code is executed:
from discord_webhook import DiscordWebhook
webhook, sent_webhook = DiscordWebhook(file='sent_webhook.swh')
webhook.delete(sent_webhook)
Is it possible?
Issue Analytics
- State:
- Created 10 months ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Is it possible to delete message sent out by bot made from ...
With the chat.delete method you normally can delete your own messages. However, your bot will not be able to delete your messages, ...
Read more >How to delete webhook message? : r/MicrosoftTeams - Reddit
Hi, I use webhook and powershell to send message to MS Teams channel but I need sometimes to delete the message and even...
Read more >chat.delete method - Slack API
This method deletes a message from a conversation. When used with a user token, this method may only delete messages that user themselves...
Read more >Delete Webhooks - Box Developer Documentation
Select the webhook you want to delete by clicking on its ID. Click the Delete button. Confirm the action by clicking Delete under...
Read more >Delete Message with the Twilio API - Pipedream
Delete a message record from your account. ... Pipedream makes it easy to connect APIs for Twilio and 1000+ other apps ... HTTP...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@beuaaa I’m currently rewriting the code to allow for something like this. In the end, this is how it will be possible:
So you’ll need to save the returned webhook id which will be available in the new
webhook.id
property.HI @beuaaa , I use redis to store the sent message ids, ( i don’t need the ids’ indefinitely so redis pretty much solves all my use cases)