Nos78 / MrData

Discord Bot providing some simple scoring using postgres
GNU General Public License v3.0
3 stars 1 forks source link

Custom command prefix doesn't work in direct message #30

Open Nos78 opened 4 years ago

Nos78 commented 4 years ago

It is not possible to enter a command in a private message, since the ability to add guild specific previxes.

Nos78 commented 4 years ago

Direct messages to discord users are not guild specific. The message object which is passed into nodejs does not have a guild object attached (message.guild is null).

Therefore, it is impossible for MrData to get the custom command prefixes, since there is no guild. One could try to find the user's guild(s), but since there may be more than one, this seems a bit sledgehammer-y to crack a nut.

We should, however, offer a feedback message acknowledging that the user tried to run a command. This message should explain that they cannot use a custom command prefix, and remind them of the default.