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

A little further in #14

Open
SatoriHoshiAiko opened this issue Aug 13, 2022 · 3 comments
Open

A little further in #14

SatoriHoshiAiko opened this issue Aug 13, 2022 · 3 comments

Comments

@SatoriHoshiAiko
Copy link

Hi there,

I managed to boot up lnbits-dicord-bot

I think allowing the right settings for the bot and doing a fresh git clone, with nom audit fix it seemed to clean up everything as required.

So I am running locally. And it seems the bot commands are working for the most part.

When entering / create @Someone - Npm crashes. The error here is:

/Volumes/X11/lnbits-discord-bot/node_modules/discord.js/src/rest/RequestHandler.js:298
throw new DiscordAPIError(data, res.status, request);
^

DiscordAPIError: Unknown interaction
at RequestHandler.execute (/Volumes/X11/lnbits-discord-bot/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (/Volumes/X11/lnbits-discord-bot/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
at async CommandInteraction.reply (/Volumes/X11/lnbits-discord-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:99:5) {
method: 'post',
path: '/interactions/1008053369409110107/aW50ZXJhY3Rpb246MTAwODA1MzM2OTQwOTExMDEwNzpPbVJpc0YxMVFxMEYxVElvVnVmTUoyQWVNQ21uYnZheUExNjdBR2ZUdzJYeEZSMEJMTHFKQXlxOWRiOUt6YlVPUldHZFZMWnlZamdLRzY0cmo0THl1RkxVdE5nWmR4bndpcmxnTVBhRXRHZ2dzakJIbWJYY2o0NVZBUUJPdXZsRQ/callback',
code: 10062,
httpStatus: 404,
requestData: {
json: {
type: 4,
data: {
content: 'You have a wallet!',
tts: false,
nonce: undefined,
embeds: undefined,
components: [ { components: [Array], type: 1 } ],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 64,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
}
},
files: []
}
}

It seems it is still struggling on the Array section.

I can confirm up to this point that it should be connection properly to the lnbits url. But I think something else is going on, it is a 404 error. And this general section is covering where I am on a local /Volume filesystem, which of course is not going to hit cleanly as the exposed DNS address. Somethings should use lnbits locally, while others are going to route through the DNS. I have a whole proxy tunnel configured but these things should still run api command without any issue.

Please if you know more about this add-on you have built, can you advise what might be missing or needing adjustment?

Thanks!

@SatoriHoshiAiko
Copy link
Author

It should be noted that by entering the command, it is a full on crash of Node.js and this makes entering / create make the bot need to be restarted each time. Just looking for something to use between myself and my friends.

Thx

@SatoriHoshiAiko
Copy link
Author

Ideally, it would be best if generating an error didn't cause npm to outright crash. Errors need to generate a notification and not a program shutdown. I wouldn't mind if something goes wrong or does not add up right, to be debugged. But for example, running /create twice also generates that an user already has a wallet, and nom shuts down completely. Another example would be, /tip or /donate with an amount greater than an user's wallet balance, when it fails the whole bot again shuts down. This is indiscriminately and would kill the application for all users instead of just returning a notification of an error.

Please if you can check up on this it would be appreciated.

@SatoriHoshiAiko
Copy link
Author

Hi will there be any follow up on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant