bans
list
Returns a list of ban objects for the users banned from this guild
params
limit?
integer
number of users to return (up to maximum 1000)
before?
user id
consider only users before given user id
after?
user id
consider only users after given user id
Returns Ban[]
get
Returns a ban object for the given user or errors if the ban cannot be found
Returns Ban
create
Create a guild ban, and optionally delete previous messages sent by the banned user
delete_message_days?
integer
number of days to delete messages for (0-7) - deprecated
delete_message_seconds?
integer
number of seconds to delete messages for, between 0 and 604800 (7 days)
Returns Ban
remove
Remove the ban for a user
Returns void
classes
Ban
Fields
reason
string | null | never
Reason for the ban - never when ban is returned from ban.create
guild_id
Snowflake
The id of the guild that the user is banned in
Methods
Get
Gets this ban and updates this class
Remove
Removes this ban
Last updated
Was this helpful?