{'message': '401: Unauthorized', 'code': 0} -- 401
{'message': '401: Unauthorized', 'code': 0}
Error related to initial run
['Traceback (most recent call last):\n', ' File "C:\Python311\Lib\site-packages\selfcord\bot.py", line 102, in run\n asyncio.run(runner())\n', ' File "C:\Python311\Lib\asyncio\runners.py", line 190, in run\n return runner.run(main)\n ^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\asyncio\runners.py", line 118, in run\n return self._loop.run_until_complete(task)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete\n return future.result()\n ^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\bot.py", line 90, in runner\n data = await self.http.static_login(token)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\api\http.py", line 48, in static_login\n self.client = Client(data)\n ^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\models\client.py", line 21, in init\n self._update(UserPayload)\n', ' File "C:\Python311\Lib\site-packages\selfcord\models\client.py", line 35, in _update\n self.name = data.get("username")\n ^^^^^^^^\n', "AttributeError: 'NoneType' object has no attribute 'get'\n"]
{'message': '401: Unauthorized', 'code': 0} -- 401 {'message': '401: Unauthorized', 'code': 0} Error related to initial run ['Traceback (most recent call last):\n', ' File "C:\Python311\Lib\site-packages\selfcord\bot.py", line 102, in run\n asyncio.run(runner())\n', ' File "C:\Python311\Lib\asyncio\runners.py", line 190, in run\n return runner.run(main)\n ^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\asyncio\runners.py", line 118, in run\n return self._loop.run_until_complete(task)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete\n return future.result()\n ^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\bot.py", line 90, in runner\n data = await self.http.static_login(token)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\api\http.py", line 48, in static_login\n self.client = Client(data)\n ^^^^^^^^^^^^\n', ' File "C:\Python311\Lib\site-packages\selfcord\models\client.py", line 21, in init\n self._update(UserPayload)\n', ' File "C:\Python311\Lib\site-packages\selfcord\models\client.py", line 35, in _update\n self.name = data.get("username")\n ^^^^^^^^\n', "AttributeError: 'NoneType' object has no attribute 'get'\n"]
import selfcord
token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" bot = selfcord.Bot()
@bot.on("ready") async def ready(time): print(f"Connected To {bot.user.name}\n Startup took {time:0.2f} seconds")
@bot.on("message") async def responder(message): if message.content == "ping!": await message.channel.send("pong!")
bot.run(token)