#need help with raw api

1 messages · Page 1 of 1 (latest)

kind jackal
#

why does the bot set a reason for banning but not kicking?

sour venture
kind jackal
sour venture
#

X-Audit-Log-Reason

kind jackal
#

so

#

wouldnt putting that in the headers be wrong?

sour venture
kind jackal
kind jackal
#

@sour venture

#

man

novel drum
#

using the X-Audit-Log-Reason header is the proper way to do this - a reason field used to work for the ban endpoint in particular, but almost no others

#

worth mentioning that you don't need full member objects for these operations, you can do guild.ban(discord.Object(<user id>)) just as well

sour venture
#

could do bot.http if haven't Guild object and only ID

novel drum
#

(they used discord in the code snippet, I didn't bother mentioning it happythonk)

sour venture
#

then they'd go to another server

novel drum
kind jackal
#

how would i define reason

sour venture
kind jackal
#

ik

sour venture
cobalt runeBOT
#

disnake/http.py line 859

def ban(
polar grottoBOT
#
Solved!

Marked the thread as solved. If your question has not been answered, please open a new thread in #1019642966526140566.