Skip to content

Unexpected behavior with bot.fetch_webhook #866

Closed
@eltaylor1104

Description

@eltaylor1104

Summary

Using bot.fetch_webhook, I receive an error that '_MissingSentinel' object has no attribute 'request'

Reproduction Steps

  1. Latest version of Pycord installed via the GitHub (alpha version)
  2. Plug in a valid webhook id to bot.fetch_webhook
  3. Receive the error

Minimal Reproducible Code

url = await bot.fetch_webhook(webhookid)
await url.send(embed=embed)

Expected Results

Send an embed to the specified webhook

Actual Results

Received this error:

  File "/home/ec2-user/Loggy/cogs/logevents.py", line 151, in on_message_edit
    url = await bot.fetch_webhook(webhookid)
  File "/home/ec2-user/.local/lib/python3.8/site-packages/discord/client.py", line 1555, in fetch_webhook
    data = await self.http.get_webhook(webhook_id)
  File "/home/ec2-user/.local/lib/python3.8/site-packages/discord/http.py", line 276, in request
    async with self.__session.request(method, url, **kwargs) as response:
AttributeError: '_MissingSentinel' object has no attribute 'request'

(webhook id is substituted out so as to not give everyone access to a webhook)

Intents

discord.Intents.all()

System Information

  • Python v3.8.5-final
  • py-cord v2.0.0-candidate
    • py-cord pkg_resources: v2.0.0rc1
  • aiohttp v3.8.1
  • system info: Linux 5.10.82-83.359.amzn2.x86_64 Update README.rst #1 SMP Tue Nov 30 20:47:14 UTC 2021

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.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions