Merge pull request #1854 from lts20050703/#1828

Add scheduledEvents field on audit log object
This commit is contained in:
Skillz4Killz
2021-12-20 21:12:38 -05:00
committed by GitHub
3 changed files with 6 additions and 1 deletions
+2
View File
@@ -48,5 +48,7 @@ export async function getAuditLogs(bot: Bot, guildId: bigint, options?: GetGuild
}
: undefined,
})),
threads: auditlog.threads.map((thread) => bot.transformers.channel(bot, { channel: thread, guildId })),
scheduledEvents: auditlog.scheduled_events.map((event) => bot.transformers.scheduledEvent(bot, event)),
};
}
+1 -1
View File
@@ -7,7 +7,7 @@ export function editBotStatus(bot: Bot, data: Omit<StatusUpdate, "afk" | "since"
bot.events.debug(`Running forEach loop in editBotStatus function.`);
bot.gateway.sendShardMessage(bot.gateway, shard, {
op: GatewayOpcodes.StatusUpdate,
op: GatewayOpcodes.PresenceUpdate,
d: {
since: null,
afk: false,
+3
View File
@@ -3,6 +3,7 @@ import { Integration } from "../integrations/integration.ts";
import { User } from "../users/user.ts";
import { Webhook } from "../webhooks/webhook.ts";
import { AuditLogEntry } from "./auditLogEntry.ts";
import { ScheduledEvent } from "../guilds/scheduledEvents.ts";
/** https://discord.com/developers/docs/resources/audit-log#audit-log-object */
export interface AuditLog {
@@ -16,4 +17,6 @@ export interface AuditLog {
integrations: Partial<Integration>[];
/** List of threads found in the audit log. */
threads: Channel[];
/** List of guild scheduled events found in the audit log */
scheduledEvents: ScheduledEvent[];
}