Closed mwmeyer closed 1 year ago
Hi there! Sorry for the delay, I didn't see this until this morning. I'll take a look ASAP.
@mwmeyer , can you add this to your asgi.py
file?
consumers_module = importlib.import_module('django_discord.py.bot.consumers')
application = ProtocolTypeRouter(
{
"http": django_asgi_app,
"channel": ChannelNameRouter(
{
"discord_bot": consumers_module.BaseDiscordConsumer.as_asgi(),
}
),
}
)
and follow the docs here https://channels.readthedocs.io/en/stable/installation.html to setup Django for async support? If you can't run in ASGI let me know and I'll add a management command to run discord.py without channels support.
thanks!
I am experiencing an error when trying to configure django_discord with an existing django app:
In my projects settings.py, i've set: DISCORD_BOT_PATH = 'myproject.myapp.discord_bot'
Which is just a simple example, which work when running manually.
The README is a little light on details regarding on how to configure an existing django project, so I am unsure whether there is a setting i've missed, or whether its my bot file.