use partial audit logs

This commit is contained in:
Skillz4Killz
2021-05-22 00:37:46 +00:00
committed by GitHub
parent 9939b03a58
commit 61e5d3fcb9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import { requireBotGuildPermissions } from "../../util/permissions.ts";
import { snakelize } from "../../util/utils.ts"; import { snakelize } from "../../util/utils.ts";
/** Returns the audit logs for the guild. Requires VIEW AUDIT LOGS permission */ /** Returns the audit logs for the guild. Requires VIEW AUDIT LOGS permission */
export async function getAuditLogs(guildId: bigint, options: GetGuildAuditLog) { export async function getAuditLogs(guildId: bigint, options: Partial<GetGuildAuditLog>) {
await requireBotGuildPermissions(guildId, ["VIEW_AUDIT_LOG"]); await requireBotGuildPermissions(guildId, ["VIEW_AUDIT_LOG"]);
return await rest.runMethod<AuditLog>( return await rest.runMethod<AuditLog>(
+1 -1
View File
@@ -369,7 +369,7 @@ export interface DiscordenoGuild
/** Edit the server. Requires the MANAGE_GUILD permission. */ /** Edit the server. Requires the MANAGE_GUILD permission. */
edit(options: ModifyGuild): ReturnType<typeof editGuild>; edit(options: ModifyGuild): ReturnType<typeof editGuild>;
/** Returns the audit logs for the guild. Requires VIEW AUDIT LOGS permission */ /** Returns the audit logs for the guild. Requires VIEW AUDIT LOGS permission */
auditLogs(options: GetGuildAuditLog): ReturnType<typeof getAuditLogs>; auditLogs(options: Partial<GetGuildAuditLog>): ReturnType<typeof getAuditLogs>;
/** Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the BAN_MEMBERS permission. */ /** Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the BAN_MEMBERS permission. */
getBan(memberId: bigint): ReturnType<typeof getBan>; getBan(memberId: bigint): ReturnType<typeof getBan>;
/** Returns a list of ban objects for the users banned from this guild. Requires the BAN_MEMBERS permission. */ /** Returns a list of ban objects for the users banned from this guild. Requires the BAN_MEMBERS permission. */