Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webhook send does not return a message #5078

Closed
3 tasks done
Helinos opened this issue Jun 29, 2020 · 1 comment
Closed
3 tasks done

webhook send does not return a message #5078

Helinos opened this issue Jun 29, 2020 · 1 comment
Labels
invalid This is not right.

Comments

@Helinos
Copy link

Helinos commented Jun 29, 2020

Summary

The webhook send function returns none instead of a message type

Reproduction Steps

import discord
from discord import Webhook, RequestsWebhookAdapter

webhook = Webhook.partial( '123456', 'abcdefg', adapter=RequestsWebhookAdapter())
msg = webhook.send("Test Message")

print(msg.id)

Expected Results

The ID of the message sent via webhook

Actual Results

Traceback (most recent call last):
  File "test.py", line 12, in <module>
    print(msg.id)
AttributeError: 'NoneType' object has no attribute 'id'

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

@bijij
Copy link
Contributor

bijij commented Jun 29, 2020

Hi there, if you read the documentation you can see that by default Webhook.send will return None, only when the wait parameter is set to True then the function will return the Message object.

@Helinos Helinos closed this as completed Jun 29, 2020
@dpy-manager-bot dpy-manager-bot added the invalid This is not right. label Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This is not right.
Projects
None yet
Development

No branches or pull requests

3 participants