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

Sending a message to a channel with await channel.send(message) does not work #6175

Closed
3 of 4 tasks
asarra opened this issue Dec 18, 2020 · 3 comments
Closed
3 of 4 tasks
Labels
intents related User provided bad/invalid intents

Comments

@asarra
Copy link

asarra commented Dec 18, 2020

Summary

Reproduction Steps

message = "somerandomstring"    
for x in text_channel_list:
        try:
            channel = bot.get_channel(x)  # gives me the name of the channel
            print(channel)
            await channel.send(message)  # bot for some reason this does not work
        except Exception as e:
            failed_channels.append(str(x))
            print(e)

Expected Results

I expected it to send a message to a list of channels

Actual Results

C:\languages\lib\site-packages\aiohttp\helpers.py:107: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
def noop(*args, **kwargs): # type: ignore
C:\languages\lib\site-packages\aiohttp\connector.py:964: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
hosts = await asyncio.shield(self._resolve_host(
C:\languages\lib\site-packages\aiohttp\locks.py:21: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
self._event = asyncio.Event(loop=loop)

Intents

I'm not using any intents.

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.
  • I have provided the intents that my bot is using.

System Information

  • Python v3.9.1-final
  • discord.py v1.5.1-final
  • aiohttp v3.6.3
  • system info: Windows 10 10.0.19041
@asarra asarra added the bug This is a bug with the library. label Dec 18, 2020
@SebbyLaw
Copy link
Contributor

Duplicate of #5867

This is not a bug with the library. Please see the recently added intents documentation and v1.5 changelog.

For further help specific to using this library, you should join either the official discord.py server or the Discord API server, as the README recommends.

@Rapptz
Copy link
Owner

Rapptz commented Dec 19, 2020

This issue doesn't have enough information to be actionable. Not using intents also means the get_channel call would fail.

@Rapptz Rapptz closed this as completed Dec 19, 2020
@asarra
Copy link
Author

asarra commented Dec 23, 2020

Thanks, using Intents fixed the issue.

@Rapptz Rapptz added intents related User provided bad/invalid intents and removed bug This is a bug with the library. labels Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intents related User provided bad/invalid intents
Projects
None yet
Development

No branches or pull requests

3 participants