#Permissions denied

1 messages · Page 1 of 1 (latest)

minor ember
rare vessel
#

hey ;/

minor ember
#

@rare vessel Depends on the permissions of the person. Is the person you are trying to ban the owner of the server? Also, I am not sure if bots are just made that way. I recommend you try getting someone to join, give them no admin permissions, and then attempt to ban them. If that doesn't work, then we'll have to figure what the issue is.

rare vessel
#

the user i banned was another bot

#

since it was just to test

#

let me try that too

#

also look in logs

#

it said banned my bot

minor ember
#

Did the bot try to ban itself?

#

I'm pretty sure it cannot do that.

rare vessel
#

no its something with the code

#

it just sent tat in the channel

#

but it didnt ban anyone

#

i only got that error on my console

#

bot did 0 actions

#

once again code

minor ember
#

Is sorrow#6644 also the bot that we see above?

rare vessel
#

and error

#

yep

#

same bot

minor ember
#

You can't ban yourself...

#

Even if you're an admin,

#

You cannot ban yourself.

#

Someone else has to ban you.

rare vessel
#

noo

minor ember
#

The bot account tried to ban itself.

rare vessel
#

this is my account which isnt admin

#

im in my alts server

#

alt has owner ship

#

and i ahve admin

#

bot is above me

minor ember
#

Okay okay,

#

Let me rewind.

#

We got,

rare vessel
#

could you please look into the code

#

because idk why it says my bots name in the embed

minor ember
#

Bot 1: Responsible for all commands

#

Bot 2: The bot you tried to ban

rare vessel
#

yep

minor ember
#

Alt Account: The owner of the server

#

Actual Account: You

rare vessel
#

correct

#

i only have admin role

minor ember
#

Okay.

rare vessel
#

and bot1 at very top

minor ember
#

Is Bot 1 and Bot 2 the same bot?

#

Or are they different?

rare vessel
#

different

#

why would ban the actual bot

#

so basically im testing bans on bots cus i cant find any actual members to help me test it

#

bots like dyno mee6

minor ember
#

Did Bot 2 have any admin permissions?

rare vessel
#

mind you they are at very bottom

#

yes i think so

minor ember
#

Could you possibly remove the admin permissions and try banning then?

rare vessel
#

can admin another admin

#

ok let me try that

minor ember
#

Alright.

#

I'll look into the code meanwhile.

#

@rare vessel any luck?

rare vessel
#

same thing :(((

#

why does it say my bots name evrytime

minor ember
#

@rare vessel When does this event fire? I see it firing every time someone is banned.

rare vessel
#

i added mudae bot

rare vessel
#

everytime it bans or kicks

minor ember
#

But what is the point of banning someone who is already banned or kicked?

rare vessel
#

it kicks the user if he is not whitelisted

minor ember
#

They are already banned.

rare vessel
#

what

minor ember
#

Shouldn't the event be onMemberAdded?

#

The event fires whenever someone leaves.

#

And it checks the reason.

#

If the reason is because they were banned,

#

The bot tries to ban them again.

rare vessel
#

did you see the code?

#

basically

#

its an anti nuke

#

so it bans anyone who breaks the limits set

#

we can set limits and if anyone is mass kicking/banning members frm the server

#

it bans them

#

when they bypass the limits

minor ember
#

Hm.

rare vessel
#

what should i do ;/

#

im so confused

minor ember
#

Try console.log() the entry.id.

rare vessel
#

console.log(entry.id)?

minor ember
#

Yes,

#

Right before the ban.

rare vessel
#

okayy

#

one sec

minor ember
#

Where is this message coming from by the way? I could not see any of these embeds in your code.

rare vessel
#

only the first embed

minor ember
rare vessel
#

second one is there in the code right

minor ember
#

It isn't.

rare vessel
#

nvm

minor ember
#

The print statement is,

rare vessel
#

thats another event

#

called roleCreate

minor ember
#

But not the actual thing.

rare vessel
#

this one

#

its the same anti nuke feature

#

if it breaks limits it bans

minor ember
#

Okay,

rare vessel
#

theres one of roleDelete channelCreate

#

they all seem to work

#

perfectly

#

only this ban and kick is broken

#

thats what got me confused

minor ember
#

Add console.log(entry.id) before role.guild.members.ban(entry.id, . .

rare vessel
#

okayy

#

let me try bannijng someone

#

and create a role

minor ember
#

Important one is creating a role I guess since that is the one we are working with.

#

Let me know how your output looks like.

rare vessel
#

here

#

look

#

it didnt log anything in my console

#

when i create roles

#

i pu tthe limit as 3

#

but it shows 0/0

minor ember
#

Can you scroll up a little?

#

Did it print the bozo one?

#

"🤡 banned rip bozo"

rare vessel
#

entire code

minor ember
#

No no.

#

The output.

#

Did it print "🤡 banned rip bozo " at all?

#

And if so, what did it print under it?

rare vessel
#

no nothing

#

its just connected to database

#

let me try banning

#

it seems to print banned rip bozo

#

when i do ban

minor ember
#

I can't really resolve any errors if you show me the bottom part of the debug.

#

I need to know the actual error message.

rare vessel
#

im sorry let me try again

minor ember
#

Example:

module.exports = Structures.extend('Message', Message => {
                            ^

TypeError: Cannot read property 'extend' of undefined
    at Object.<anonymous> (C:\Users\Batman212369\Desktop\Discord Bots\RHS-Bot\node_modules\discord.js-
#

Another example:

a
bbbbbbbbbbbb
C:\Users\Batman212369\Desktop\Discord Bots\JS-Bot\node_modules\discord.js\src\rest\RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Unknown interaction
    at RequestHandler.execute (C:\Users\Batman212369\Desktop\Discord Bots\JS-Bot\node_modules\discord.js\src\rest\RequestHandler.js:298:13)
#

You can blur the user, I just need to know the actual error.

rare vessel
#

yes

#

sorry

#

i tried it now

#

it gives no error

#

the above one was a silly mistake on my part

#

now it just sends 0/0 message in logs

#

it doesnt print banned rip bozp

#

because it doesnt break the limits

#

see it always says 0/0

#

usually it says 1/3

#

2/3

#

3/3

#

and then banned rip bozo embed

#

now it just spams the same 0/0 embed

#

@minor ember

#

plz ping me when ur back

#

i need help D:

minor ember
#

Weird.

#

Didn't we only change a single line that said "console.log()"?

#

It shouldn't have affected it like that.

#

@rare vessel add the console.log(entry.id) line in the ban thing as well (right under the bozo thing).

#

And try there.

rare vessel
#

it just sends the 0/0

#

embed

#

let me try ban now

#

roleCreate just spams 0/0 embed

#

but when i delete roles

#

it works

#

sends correct number like 1/2

#

and on 2/2 it bans

#

its perfect

#

but the ban,kick,role create is broken

#

let me try ban

#

see what it logs

#

dude i honestly dont know whats going on....

#

i banned the bot on my alt

#

and it banned me on my main account nibbler

#

the bot seems to be faster than discord audit logs for some reason too it banned me right when i banned a bot on my alt account

#

@minor ember

minor ember
#

I'm lost as well.

#

I have no idea what could be wrong.

rare vessel
#

do you have any idea

#

if db.delete a thing?

#

quick.db package btw

#

idk if u use it ;/

#

nnvm it is

#

i checked

#

man what is this problem ;/

minor ember
#

At this point, I suggest you try to use a debugger in order to go step-by-step through the process to see where it starts freaking out.

rare vessel
#

ok fine

#

ill figure something out ;/

#

@minor ember thank you so much fo your time

#

i really appreciate it man youre so nice 😄

minor ember
#

Aye, thank you. I am glad I could help (although we didn't solve it, we went through different steps). Best of luck with debugging!