Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cookie command needs to accommodate usernames without an at-sign #33

Closed
KeeperOfMaps opened this issue Oct 29, 2022 · 3 comments
Closed
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Comments

@KeeperOfMaps
Copy link
Contributor

The cookie command should be able to handle a username that does not start with an @-sign.

This should resolve the following errors:

2022-10-29T06:38:38.182091604Z     at Object.exports.run (/usr/src/app/commands/cookie.js:12:19)
2022-10-29T06:38:38.182097835Z     at Client.<anonymous> (/usr/src/app/main.js:135:21)
2022-10-29T06:38:38.182103034Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
@KeeperOfMaps KeeperOfMaps added the bug Something isn't working label Oct 29, 2022
@KeeperOfMaps
Copy link
Contributor Author

Also, documentation for the command should reflect the need for an at-sign.

@TheRealFakeAdmin
Copy link
Member

The cookie command should be able to handle a username that does not start with an @-sign.

Sadly, because of the lack of permissions [see GUILD_MEMBERS here], the bot only has access to the sending user and any mentioned per message. This means the bot cannot convert a text-name to a valid mention.

There is a chance that the bot can just do @username, having Discord convert it to a mention, though this needs further testing.


Also, documentation for the command should reflect the need for an at-sign.

Noted. I will add that along with the other fixes.


2022-10-29T06:38:38.182091604Z     at Object.exports.run (/usr/src/app/commands/cookie.js:12:19)
2022-10-29T06:38:38.182097835Z     at Client.<anonymous> (/usr/src/app/main.js:135:21)
2022-10-29T06:38:38.182103034Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)

The error above should not occur either way; I will look into that.

@TheRealFakeAdmin TheRealFakeAdmin added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 2, 2022
TheRealFakeAdmin added a commit that referenced this issue Feb 21, 2023
- Fixed issues noted in #33
  - Usage now shows optional `@user_mention`
    - No mention arg to give the bot a cookie
  - Fixed `at Object.exports.run (/usr/src/app/commands/cookie.js:12:19)` error
  - Because multiple users can have the same username, `@username` mentions will not be supported
@TheRealFakeAdmin
Copy link
Member

This was fixed in a recent release. Cookie no longer returns a mention but the nickname, so any input (including mentions) will be returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants