#Limits is set to `2` in the database but the bot still bans after one channel create..

1 messages · Page 1 of 1 (latest)

pseudo dew
#

What are you even trying to do? You're not checking for the limit anywhere you're just looping over the audit log

floral spruce
#

basically the bot bans whnever a user creates a certain amount of channels

#

therefore whenever a user creates whatever limits is set to

#

it bans

azure granite
#

Well, you're just looping and kicking/banning every user that matches your audit log

#

.rtfm Guild.audit_logs

static breachBOT
azure granite
#

You're misunderstanding how limit= works

pseudo dew
floral spruce
#

could this work

#

@azure granite

#

didn't work

#

and no error

#

anyway

floral spruce
azure granite
#

Guild.audit_logs has a user kwarg to filter

#

Combined with the action kwarg will only returns the entries by that user

#

Flatten it, check the len, do the punishments

floral spruce
#

just one issue

#

the limit is set to 2 as of rn.. but it doesnt ban on the 2nd channel create but instead the 3rd

#

why is that

azure granite
#

Read my messages.

floral spruce
#

wym

floral spruce
#

doesnt answer my questio n

#

what im trying to do works

#

i just dont see why it adds a +1 limit to the limits

azure granite
#

It doesn't work if it doesn't do what you want

pseudo dew
#

You clearly don't know what you're doing