mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
use partial audit logs
This commit is contained in:
@@ -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>(
|
||||||
|
|||||||
@@ -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. */
|
||||||
|
|||||||
Reference in New Issue
Block a user