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

Scrabble module throws TypeError on URL #281

Closed
zuzak opened this issue Jun 11, 2019 · 1 comment · Fixed by #276
Closed

Scrabble module throws TypeError on URL #281

zuzak opened this issue Jun 11, 2019 · 1 comment · Fixed by #276
Labels
bug problems that existing features cause
Milestone

Comments

@zuzak
Copy link
Contributor

zuzak commented Jun 11, 2019

If you send a URL, like this:

< human> https://example.com

The bot throws a stack trace:

Error processing message event:
TypeError: Cannot read property 'count' of undefined
    at scrabbleNotate (modules/scrabble.js:66:36)
    at computeWord (modules/scrabble.js:56:16)
    at phrase.forEach (/modules/scrabble.js:115:22)
    at Array.forEach (<anonymous>)
    at Client.message (modules/scrabble.js:113:14)
    at Client.fireEvents (modules/fireEvents.js:16:28)
    at Client.<anonymous> (plugins/listeners.js:4:11)
    [truncated]

I think this means #277 fails via #280.

Related to #272.

@zuzak zuzak added the bug problems that existing features cause label Jun 11, 2019
@zuzak zuzak added this to the Scrabble milestone Jun 11, 2019
@georgewatson
Copy link
Contributor

I think I fixed this in #276. That wasn't really the best place for it, but it's what happened.

The relevant change is scrabble.js:66

if (letter in bag) {

zuzak pushed a commit that referenced this issue Jun 17, 2019
@zuzak zuzak closed this as completed in c4ee558 Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug problems that existing features cause
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants