Kraigie / nostrum

Elixir Discord Library
https://kraigie.github.io/nostrum/
MIT License
608 stars 128 forks source link

Provide friendlier message for missing consumer startup #570

Open jchristgit opened 5 months ago

jchristgit commented 5 months ago

Currently we emit the following message when no consumer was detected:

No consumers were running nor did any start up in time for shard session startup. Is a consumer started as part of your supervision tree?

While this isn't bad, I think we would benefit from making this a bit more user-friendly. For instance, people that are new to Elixir might not know how to start the consumer as part of the supervision tree, or might have skipped the docs for it by accident. Reading the README, we also currently only show that you need to 1. install nostrum and 2. configure a bot token, but no mention is made of having to configure the consumer. (I will open a separate ticket for this)

We should update this message to be more clear and point to the README or another example on how to properly start the consumer. For example:

No consumers were running nor did any start up in time for shard session startup.
nostrum's consumers receive events from the Discord Gateway, if no consumer is running, your bot will not receive any events.
Make sure that your application is starting a consumer as part of your supervision tree.
The documentation explains how to do this: https://hexdocs.pm/nostrum/intro.html#setup
If you're still unsure, feel free to ask for help on Discord: https://discord.gg/2Bgn8nW

Would be happy for other thoughts on this.