question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using one webhook returns as a list

See original GitHub issue

Hello guys!

Today I discovered that when I used one webhook, it sometimes returns as just one string etc if I do

response = webhook.execute()
print(response)

as: <Response [200]>

but lately I did find out that it sometimes returns as: [<Response [200]>]

I assume this is sort of bug where it shouldn’t mix between list and non-list when sending only using one webhook

This cause me an error where I cant use response.ok anymore since its inside a List but that shouldn’t happen if im not using multiple webhooks url which I dont.

Name: discord-webhook
Version: 0.11.0
Summary: execute discord webhooks
Home-page: https://github.com/lovvskillz/python-discord-webhook
Author: Vadim Zifra
Author-email: vadim@minehub.de
License: MIT License
Location: /home/barry/.local/lib/python3.8/site-packages
Requires: requests
Required-by:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
lovvskillzcommented, Mar 2, 2021

I think I will change that later today or tomorrow and also provide a release.

1reaction
BarryThrillcommented, Mar 2, 2021

Actually, there should always be a list returned. No matter if only one webhook URL was given or several. However, when I think about it, it would be better to just return the response directly if only one URL is given.

Thay would make sense I guess. Im pretty sure that is the way it supposed to do. If more than one webhook URL then return the response in the list but if only one then no need to be in a list. The bug is that it sometimes returns in list using only one webhook.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I have the Perform List in a Webhook Trigger return one ...
You can use a Loop by Zapier action to iterate through all the array items one at a time. It will, however, treat...
Read more >
Best practices for using webhooks | Stripe Documentation
Webhooks provide a powerful method to track the state of transactions and to take actions within your Stripe account. Review these best practices...
Read more >
Sending messages using Incoming Webhooks - Slack API
Incoming Webhooks are a simple way to post messages from apps into Slack. Creating an Incoming Webhook gives you a unique URL to...
Read more >
Triggering multiple webhooks with Zapier array of Json objects
I want to fire a webhook to shopify for each of those items and decrease the inventory For each of the items there...
Read more >
SharePoint webhooks sample reference implementation
The reference implementation works with a SharePoint list. To add a webhook to a SharePoint list, your application first creates a webhook ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found