chrislennon / lnbits-discord-bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A little further in

SatoriHoshiAiko opened this issue · comments

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!

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

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.

Hi will there be any follow up on this?