Parameters
Optionalparams: {
after?: null | string;
before?: null | string;
limit?: null | number;
target?: null | string;
type?: null | string[];
user?: null | string;
}Optionalafter?: null | string
Optionalbefore?: null | string
Optionallimit?: null | number
Optionaltarget?: null | string
Optionaltype?: null | string[]
Optionaluser?: null | string
Returns Promise<
{
audit_logs: {
_id: string;
action: | { author: string; channel: string; type: "MessageDelete" }
| { channel: string; count: number; type: "MessageBulkDelete" }
| {
author: string;
channel: string;
message: string;
type: "MessagePin";
}
| {
author: string;
channel: string;
message: string;
type: "MessageUnpin";
}
| { type: "BanCreate"; user: string }
| { type: "BanDelete"; user: string }
| { channel: string; name: string; type: "ChannelCreate" }
| {
after: {
active?: null | boolean;
default_permissions?: null | { a: number; d: number };
description?: null | string;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
last_message_id?: null
| string;
name?: null | string;
nsfw?: null | boolean;
owner?: null | string;
permissions?: null | number;
role_permissions?: null | { [key: string]: { a: number; d: number } };
slowmode?: null | number;
voice?: null | { max_users?: null | number };
};
before: {
active?: null
| boolean;
default_permissions?: null | { a: number; d: number };
description?: null | string;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
last_message_id?: null
| string;
name?: null | string;
nsfw?: null | boolean;
owner?: null | string;
permissions?: null | number;
role_permissions?: null | { [key: string]: { a: number; d: number } };
slowmode?: null | number;
voice?: null | { max_users?: null | number };
};
channel: string;
type: "ChannelEdit";
}
| {
channel: string;
permissions: { allow: number; deny: number };
role: string;
type: "ChannelRolePermissionsEdit";
}
| { channel: string; name: string; type: "ChannelDelete" }
| {
after: {
avatar?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
can_publish?: null
| boolean;
can_receive?: null | boolean;
id?: null | { server: string; user: string };
joined_at?: null | string;
nickname?: null | string;
pronouns?: null | string;
roles?: null | string[];
timeout?: null | string;
};
before: {
avatar?: | null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
can_publish?: null
| boolean;
can_receive?: null | boolean;
id?: null | { server: string; user: string };
joined_at?: null | string;
nickname?: null | string;
pronouns?: null | string;
roles?: null | string[];
timeout?: null | string;
};
type: "MemberEdit";
user: string;
}
| { type: "MemberKick"; user: string }
| {
after: {
analytics?: null | boolean;
banner?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
categories?: null
| { channels: (...)[]; id: string; title: string }[];
channels?: null | string[];
default_permissions?: null | number;
description?: null | string;
discoverable?: null | boolean;
flags?: null | number;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
id?: null
| string;
name?: null | string;
nsfw?: null | boolean;
owner?: null | string;
roles?:
| null
| {
[key: string]: {
_id: string;
colour?: (...)
| (...)
| (...);
hoist?: (...) | (...) | (...);
icon?: (...) | (...) | (...);
name: string;
permissions: { a: ...; d: ... };
rank?: (...) | (...);
};
};
system_messages?: | null
| {
user_banned?: null
| string;
user_joined?: null | string;
user_kicked?: null | string;
user_left?: null | string;
};
};
before: {
analytics?: null
| boolean;
banner?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
categories?: null
| { channels: (...)[]; id: string; title: string }[];
channels?: null | string[];
default_permissions?: null | number;
description?: null | string;
discoverable?: null | boolean;
flags?: null | number;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
id?: null
| string;
name?: null | string;
nsfw?: null | boolean;
owner?: null | string;
roles?:
| null
| {
[key: string]: {
_id: string;
colour?: (...)
| (...)
| (...);
hoist?: (...) | (...) | (...);
icon?: (...) | (...) | (...);
name: string;
permissions: { a: ...; d: ... };
rank?: (...) | (...);
};
};
system_messages?: | null
| {
user_banned?: null
| string;
user_joined?: null | string;
user_kicked?: null | string;
user_left?: null | string;
};
};
type: "ServerEdit";
}
| {
after: {
colour?: null
| string;
hoist?: null | boolean;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
id?: null
| string;
name?: null | string;
permissions?: null | { a: number; d: number };
rank?: null | number;
};
before: {
colour?: null
| string;
hoist?: null | boolean;
icon?:
| null
| {
_id: string;
content_type: string;
deleted?: null
| boolean;
filename: string;
message_id?: null | string;
metadata:
| { type: ... }
| { type: ... }
| {
animated?: ...;
height: ...;
thumbhash?: ...;
type: ...;
width: ...;
}
| { height: ...; type: ...; width: ... }
| { type: ... };
object_id?: null | string;
reported?: null | boolean;
server_id?: null | string;
size: number;
tag: string;
user_id?: null | string;
};
id?: null
| string;
name?: null | string;
permissions?: null | { a: number; d: number };
rank?: null | number;
};
role: string;
type: "RoleEdit";
}
| { name: string; role: string; type: "RoleCreate" }
| { name: string; role: string; type: "RoleDelete" }
| { after: string[]; before: string[]; type: "RolesReorder" }
| { channel: string; invite: string; type: "InviteCreate" }
| { channel: string; invite: string; type: "InviteDelete" }
| {
channel: string;
name: string;
type: "WebhookCreate";
webhook: string;
}
| {
channel: string;
name: string;
type: "WebhookDelete";
webhook: string;
}
| { emoji: string; name: string; type: "EmojiCreate" }
| {
after: { name?: null | string };
before: { name?: null | string };
emoji: string;
type: "EmojiUpdate";
}
| { emoji: string; name: string; type: "EmojiDelete" };
reason?: null | string;
server: string;
target?: null | string;
user: string;
}[];
members: ServerMember[];
users: User[];
},
>
This server's tracked actions, members and users
Server Class