So it is supposed to be clear and simple, the bot creates a channel that is named after the user ID when they login, i get this error:
Traceback (most recent call last):
File "C:\Users\HP\Documents\personal projects\store\try 5\echodrive\discord_bot\services.py", line 58, in _create_channel
print(f"Created channel {channel.name} for user {user_id}")
^^^^^^^^^^^^
AttributeError: 'coroutine' object has no attribute 'name'
C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\asyncio\tasks.py:314: RuntimeWarning: coroutine 'Guild.create_text_channel' was never awaited
result = coro.send(None)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Error creating Discord channel: object NoneType can't be used in 'await' expression
Full traceback:
Traceback (most recent call last):
File "C:\Users\HP\Documents\personal projects\store\try 5\echodrive\discord_bot\views.py", line 57, in register_view
channel_id = async_to_sync(bot.create_user_channel)(user_profile.profile_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\site-packages\asgiref\sync.py", line 254, in __call__
return call_result.result()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\_base.py", line 401, in __get_result
raise self._exception
File "C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\site-packages\asgiref\sync.py", line 331, in main_wrap
result = await self.awaitable(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression```