Sank6 / Discord-Bot-List

Just another botlist for discord
GNU General Public License v3.0
213 stars 185 forks source link

Error: #369

Closed walmart44 closed 3 years ago

walmart44 commented 3 years ago

Im trying to connect to the database with this "mongo_url": "mongodb://localhost:27017/admin", but im,getting this error

(node:26140) UnhandledPromiseRejectionWarning: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 at NativeConnection.Connection.openUri (C:\Users\uuu\Desktop\Discord-Bot-List\node_modules\mongoose\lib\connection.js:830:32) at C:\Users\uuu\Desktop\Discord-Bot-List\node_modules\mongoose\lib\index.js:342:10 at C:\Users\uuu\Desktop\Discord-Bot-List\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:5 at new Promise () at promiseOrCallback (C:\Users\uuu\Desktop\Discord-Bot-List\node_modules\mongoose\lib\helpers\promiseOrCallback.js:30:10) at Mongoose._promiseOrCallback (C:\Users\uuu\Desktop\Discord-Bot-List\node_modules\mongoose\lib\index.js:1129:10) at Mongoose.connect (C:\Users\uuu\Desktop\Discord-Bot-List\node_modules\mongoose\lib\index.js:341:20) at C:\Users\uuu\Desktop\Discord-Bot-List\src\index.js:10:20 at Object. (C:\Users\uuu\Desktop\Discord-Bot-List\src\index.js:21:3) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 (Use node --trace-warnings ... to show where the warning was created) (node:26140) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:26140) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Meszpo commented 3 years ago

Please check, if your database is running on this port

ShootDot commented 3 years ago

Try changing the admin to some other word like botlist etc

Example :- mongodb://localhost:27017/botlist

ShootDot commented 3 years ago

And Are you using Windows OS to host this ?

ShootDot commented 3 years ago

If you are using Windows Goto Control Panel --> Administrative Tools --> Services --> Search For MongoDB --> Right Click and press Start --> Wait for it to start --> Start the bot list

walmart44 commented 3 years ago

If you are using Windows

Goto Control Panel --> Administrative Tools --> Services --> Search For MongoDB --> Right Click and press Start --> Wait for it to start --> Start the bot list

I don't think I even setup mongodb on my computer. How would I go about on doing that?

ShootDot commented 3 years ago

Then please install mongodb

On Mon, 30 Nov 2020, 7:51 pm walmart44, notifications@github.com wrote:

If you are using Windows

Goto Control Panel --> Administrative Tools --> Services --> Search For MongoDB --> Right Click and press Start --> Wait for it to start --> Start the bot list

I don't think I even setup mongodb on my computer. How would I go about on doing that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Sank6/Discord-Bot-List/issues/369#issuecomment-735870942, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPSYXK6D72WN6VVML3PDSSO5RJANCNFSM4UG5OCRQ .

Sank6 commented 3 years ago

https://www.mongodb.com/try/download

walmart44 commented 3 years ago

Then please install mongodb On Mon, 30 Nov 2020, 7:51 pm walmart44, @.***> wrote: If you are using Windows Goto Control Panel --> Administrative Tools --> Services --> Search For MongoDB --> Right Click and press Start --> Wait for it to start --> Start the bot list I don't think I even setup mongodb on my computer. How would I go about on doing that? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#369 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPSYXK6D72WN6VVML3PDSSO5RJANCNFSM4UG5OCRQ .

yea got it but how am I suppose to call a callback url if it's not released yet?

walmart44 commented 3 years ago

nvm

walmart44 commented 3 years ago

The submit button doesn't work when adding bot

Sank6 commented 3 years ago

Any error? Have you sorted out the captcha?

walmart44 commented 3 years ago

Any error? Have you sorted out the captcha?

No errors and is it required the captcha?

If so is it possible to set up the captcha on localhost?

walmart44 commented 3 years ago

Ok but when someone adds the bot is it suppose to be added to the server?

walmart44 commented 3 years ago

Figured out the captcha part btw

walmart44 commented 3 years ago

Also when you try to remove the bot it doesn't remove it from the website like from the user profile

walmart44 commented 3 years ago

Also when you add a bot and not verify it. When you go to the search the bot shows up there.

ShootDot commented 3 years ago

Yea it is shown but when u try to view it it will show forbidden. Yeah so it isn't a bug

ShootDot commented 3 years ago

Ok but when someone adds the bot is it suppose to be added to the server?

No You manually need to add it

ShootDot commented 3 years ago

Also when you try to remove the bot it doesn't remove it from the website like from the user profile

It doesn't get removed so that the user may resubmit again after fixing the issues.

walmart44 commented 3 years ago

Also when you try to remove the bot it doesn't remove it from the website like from the user profile

It doesn't get removed so that the user may resubmit again after fixing the issues.

Ok so that delete button really does nothing

ShootDot commented 3 years ago

The delete button deletes the bot from everywhere.

On Tue, 1 Dec 2020, 5:33 pm walmart44, notifications@github.com wrote:

Also when you try to remove the bot it doesn't remove it from the website like from the user profile

It doesn't get removed so that the user may resubmit again after fixing the issues.

Ok so that delete button really does nothing

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Sank6/Discord-Bot-List/issues/369#issuecomment-736554092, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPS75NCIGZPW3NCKJZITSSTWENANCNFSM4UG5OCRQ .

walmart44 commented 3 years ago

The delete button deletes the bot from everywhere. On Tue, 1 Dec 2020, 5:33 pm walmart44, @.***> wrote: Also when you try to remove the bot it doesn't remove it from the website like from the user profile It doesn't get removed so that the user may resubmit again after fixing the issues. Ok so that delete button really does nothing — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#369 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPS75NCIGZPW3NCKJZITSSTWENANCNFSM4UG5OCRQ .

But when I tried clicking it and then entered the bots name it didn't delete it. It just stayed on the profile so that's what its suppose to do right?

ShootDot commented 3 years ago

Nope it deletes. Idk why it isn't working for you.

On Tue, 1 Dec 2020, 6:48 pm walmart44, notifications@github.com wrote:

The delete button deletes the bot from everywhere. … <#m4502897884739265989> On Tue, 1 Dec 2020, 5:33 pm walmart44, @.***> wrote: Also when you try to remove the bot it doesn't remove it from the website like from the user profile It doesn't get removed so that the user may resubmit again after fixing the issues. Ok so that delete button really does nothing — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#369 (comment) https://github.com/Sank6/Discord-Bot-List/issues/369#issuecomment-736554092>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPS75NCIGZPW3NCKJZITSSTWENANCNFSM4UG5OCRQ .

But when I tried clicking it and then entered the bots name it didn't delete it. It just stayed on the profile so that's what its suppose to do right?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Sank6/Discord-Bot-List/issues/369#issuecomment-736598454, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPS5AHCU6EZMOSAHMJCLSST65DANCNFSM4UG5OCRQ .

walmart44 commented 3 years ago

Nope it deletes. Idk why it isn't working for you. On Tue, 1 Dec 2020, 6:48 pm walmart44, @.> wrote: The delete button deletes the bot from everywhere. … <#m4502897884739265989> On Tue, 1 Dec 2020, 5:33 pm walmart44, @.> wrote: Also when you try to remove the bot it doesn't remove it from the website like from the user profile It doesn't get removed so that the user may resubmit again after fixing the issues. Ok so that delete button really does nothing — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#369 (comment) <#369 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPS75NCIGZPW3NCKJZITSSTWENANCNFSM4UG5OCRQ . But when I tried clicking it and then entered the bots name it didn't delete it. It just stayed on the profile so that's what its suppose to do right? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#369 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPS5AHCU6EZMOSAHMJCLSST65DANCNFSM4UG5OCRQ .

and If you download the zip and do all the stuff again it will work for you still?

walmart44 commented 3 years ago

I think is the correct part to delete if (val.state == "deleted") a.small.half.half-left.button(href=/bots/resubmit/${val.botid}/) Resubmit a.small.half.half-right.button.button-red.delete(href="#confirm" data-id=val.botid data-name=val.username) | Delete else a.small.half.half-left.button(href=/bots/edit/${val.botid}/) Edit Bot a.small.half.half-right.button.button-red.delete(href="#confirm" data-id=val.botid data-name=val.username) | Delete

ShootDot commented 3 years ago

Nope i isn't this is the code to remove the bot or deny the bot

walmart44 commented 3 years ago

Where is it located to remove the bot from the profile?

walmart44 commented 3 years ago

Where is it located to remove the bot from the profile?

also it looks like it doesn't get deleted from database

walmart44 commented 3 years ago

oh i think this is it $( document ).ready(async function() { $(".link").click((e) => { $(".section").hide(); $(e.target.href.split("/#").slice(-1)[0]).show() }) $(document).on("click",".delete", function () { let newval = prompt(Type ${$(this).attr("data-name")} to confirm)

    if (newval.toLowerCase() === $(this).attr("data-name").toLowerCase()) {
        fetch(`/api/bots/${$(this).attr("data-id")}`, {method: "DELETE"}).then(() => location.href = "/me")
    } else location.reload();
})

})

ShootDot commented 3 years ago

It get's deleted from database.

ShootDot commented 3 years ago

Here is the code for the bot deletion.

walmart44 commented 3 years ago

ok yea i have that that's odd that it doesn't remove it from database

ShootDot commented 3 years ago

And this is the code for the prompt of delete button. So you told it get's refreshed once you enter the bot name according to the code if you enter incorrect bot name it will refresh without deleting the bot. Code here

walmart44 commented 3 years ago

i have that let me try again

walmart44 commented 3 years ago

nope doesn't remove it

ShootDot commented 3 years ago

Works for me check console if any errors send here.

walmart44 commented 3 years ago

no errors

walmart44 commented 3 years ago

could it be because i have nothing in here "domain_with_protocol": "",

ShootDot commented 3 years ago

Nope that wont be the issue. But add your domain in domain with protocol if it's localhost then http://localhost

walmart44 commented 3 years ago

ok but it's weird that its not working

walmart44 commented 3 years ago

What should I do?

walmart44 commented 3 years ago

The bots are being added to the database but its not being removed im so confused

ShootDot commented 3 years ago

Yea it's supposed to delete. I'm not on PC. I will try once I'm on PC

walmart44 commented 3 years ago

Yea it's supposed to delete. I'm not on PC. I will try once I'm on PC

Ok

walmart44 commented 3 years ago

@shootdot Have you tested it?

ShootDot commented 3 years ago

Yea works pretty well for me.

On Wed, 2 Dec 2020, 4:20 am walmart44, notifications@github.com wrote:

@shootdot https://github.com/shootdot Have you tested it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sank6/Discord-Bot-List/issues/369#issuecomment-736904370, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKUPSZXVJ5CMFYHH5OMZTTSSWB5DANCNFSM4UG5OCRQ .

walmart44 commented 3 years ago

Could we maybe go onto discord at some point and you can take a look at what I have?

Sank6 commented 3 years ago

Works for me as well. Is there anything else you have blank in your config?7 Also, check that the role for the bot managing the server is highest.

ShootDot commented 3 years ago

Sorry I can't share my Discord ID as I don't want peoples to spam my DM in Discord. Follow Sank6 Steps it may help you.

walmart44 commented 3 years ago

Works for me as well. Is there anything else you have blank in your config?7

Also, check that the role for the bot managing the server is highest.

I have nothing left blank and it is the highest role