OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Discord.py error "discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 4013"

  • Thread starter Thread starter KaiLando
  • Start date Start date
K

KaiLando

Guest
So, I have a Discord API named "PySend".

I have the permissions value & token set.

Here's the code:

Code:
# This example requires the 'message_content' intent.

import discord

class MyClient(discord.Client):
    async def on_ready(self):
        print(f'Logged on as {self.user}!')

    async def on_message(self, message):
        print(f'Message from {message.author}: {message.content}')

intents = discord.Intents.default()
intents.value = **************
intents.message_content = True
print(intents)

client = MyClient(intents=intents)
client.run('***********************************************************************')

Based off of Introduction

The * parts are my bot's private info that I asterisked out, not what I typed into my program.

I looked at some documentation, that's all.
<p>So, I have a Discord API named "PySend".</p>
<p>I have the permissions value & token set.</p>
<p>Here's the code:</p>
<pre><code># This example requires the 'message_content' intent.

import discord

class MyClient(discord.Client):
async def on_ready(self):
print(f'Logged on as {self.user}!')

async def on_message(self, message):
print(f'Message from {message.author}: {message.content}')

intents = discord.Intents.default()
intents.value = **************
intents.message_content = True
print(intents)

client = MyClient(intents=intents)
client.run('***********************************************************************')
</code></pre>
<p>Based off of <a href="https://discordpy.readthedocs.io/en/stable/intro.html" rel="nofollow noreferrer">Introduction</a></p>
<p>The <code>*</code> parts are my bot's private info that I asterisked out, not what I typed into my program.</p>
<p>I looked at some documentation, that's all.</p>
I have found how to fix this.
 
Top