Guest User

Untitled

a guest
May 9th, 2026
94
0
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* eslint-disable @typescript-eslint/no-unused-vars */
  2. import {
  3.   AuditLogChange,
  4.   AuditLogEvent,
  5.   ChannelType,
  6.   Client,
  7.   EmbedBuilder,
  8.   Events,
  9.   GuildAuditLogsEntry,
  10.   GuildAuditLogsTargetType,
  11.   GuildChannel,
  12.   GuildEmoji,
  13.   GuildScheduledEvent,
  14.   Integration,
  15.   Invite,
  16.   Role,
  17.   StageInstance,
  18.   Sticker,
  19.   time,
  20.   Webhook,
  21. } from "discord.js";
  22. import { injectable } from "tsyringe";
  23.  
  24.  
  25. /** * Checks if the given value is undefined.
  26.  * @param value - The value to check.
  27.  * @returns `true` if the value is undefined, otherwise `false`. */
  28. export function isUndefined(value: unknown): boolean {
  29.   return value === undefined;
  30. }
  31. /** * Checks if the audit log change is related to communication being disabled.
  32.  * @param change - The audit log change to check.
  33.  * @returns `true` if the change is related to communication being disabled, otherwise `false`. */
  34. export function isCommunicationDisabledUntil(change: AuditLogChange): boolean {
  35.   return change.key === "communication_disabled_until";
  36. }
  37. import type { Event } from "@yuudachi/framework/types";
  38.  
  39. @injectable()
  40. export default class implements Event {
  41.   public name = "Audit log";
  42.  
  43.   public event = Events.GuildAuditLogEntryCreate as const;
  44.  
  45.   public constructor(public readonly client: Client<true>) {}
  46.  
  47.   public async execute(): Promise<void> {
  48.     this.client.on(
  49.       this.event,
  50.       async (auditLogEntry: GuildAuditLogsEntry, guild) => {
  51.         console.log(auditLogEntry);
  52.         const change = auditLogEntry.changes[0]!;
  53.  
  54.         function getTargetName(audit: GuildAuditLogsEntry): string {
  55.           if (typeof audit === "object" && audit !== null) {
  56.             if ("name" in audit && typeof audit.name === "string") {
  57.               return audit.name;
  58.             } else if ("code" in audit && typeof audit.code === "string") {
  59.               return audit.code;
  60.             } else if ("topic" in audit && typeof audit.topic === "string") {
  61.               return audit.topic;
  62.             }
  63.           }
  64.  
  65.           if (audit === null) {
  66.             return "N/A";
  67.           }
  68.           return audit?.target?.toString() || "N/A";
  69.         }
  70.  
  71.         const embed = new EmbedBuilder()
  72.           .setTitle("Audit Log Entry")
  73.           .setColor(0x00ae86)
  74.           .setTimestamp(new Date())
  75.           .addFields(
  76.             {
  77.               name: "Action",
  78.               value: auditLogEntry.actionType.toString(),
  79.               inline: true,
  80.             },
  81.             {
  82.               name: "Target",
  83.               value: getTargetName(auditLogEntry) || "N/A",
  84.               inline: true,
  85.             },
  86.             {
  87.               name: "Executor",
  88.               value: auditLogEntry.executor?.tag || "N/A",
  89.               inline: true,
  90.             },
  91.           );
  92.  
  93.         const formatChange = (changeValue: unknown) => {
  94.           if (Array.isArray(changeValue)) {
  95.             return changeValue
  96.               .map((element) =>
  97.                 Object.entries(element)
  98.                   .map(([key, value]) => `\n\u3000 ${key}: ${value}`)
  99.                   .join(" "),
  100.               )
  101.               .join(", ");
  102.           }
  103.           return changeValue !== undefined ? changeValue : "N/A";
  104.         };
  105.  
  106.         const changesDoneNew = auditLogEntry.changes
  107.           .map((change: AuditLogChange) => {
  108.             return `**❯** ${change.key}:\n\u3000 New: ${formatChange(change.new)}`;
  109.           })
  110.           .join("\n");
  111.  
  112.         const changesDoneOld = auditLogEntry.changes
  113.           .map((change: AuditLogChange) => {
  114.             return `**❯** ${change.key}:\n\u3000 Old: ${formatChange(change.old)}`;
  115.           })
  116.           .join("\n");
  117.  
  118.         const changesDone =
  119.           auditLogEntry.changes
  120.             .map((change: AuditLogChange) => {
  121.               return `**❯** ${change.key}:\n\u3000 New: ${formatChange(change.new)} \n\u3000 Old: ${formatChange(change.old)}`;
  122.             })
  123.             .join("\n") || "No changes";
  124.  
  125.         const newlogDate = change.new
  126.           ? new Date(change.new as string | number | Date)
  127.           : undefined;
  128.  
  129.         function changes(_target: GuildAuditLogsTargetType): string {
  130.           if (change) {
  131.             const communicationDisabled = isCommunicationDisabledUntil(change);
  132.             if (communicationDisabled) {
  133.               return `**❯** ${change.key}:\n\u3000 Until: ${formatChange(time(newlogDate))}`;
  134.             }
  135.             return `${isUndefined(change.new) ? changesDoneOld : isUndefined(change.old) ? changesDoneNew : changesDone}`;
  136.           }
  137.           return "No changes";
  138.         }
  139.  
  140.         switch (auditLogEntry.action) {
  141.           case AuditLogEvent.GuildUpdate:
  142.             embed.setDescription(
  143.               `Guild updated: ${auditLogEntry.target}\nChanges:\n${changes("Guild")}`,
  144.             );
  145.             break;
  146.           case AuditLogEvent.ChannelCreate:
  147.             if (auditLogEntry.target instanceof GuildChannel) {
  148.               embed.setDescription(
  149.                 `Channel created: ${auditLogEntry.target.name}\nType: ${ChannelType[auditLogEntry.target.type]}`,
  150.               );
  151.             }
  152.             break;
  153.           case AuditLogEvent.ChannelUpdate:
  154.             if (auditLogEntry.target instanceof GuildChannel) {
  155.               embed.setDescription(
  156.                 `Channel updated: ${auditLogEntry.target.name}\nChanges:\n${changes("Channel")}`,
  157.               );
  158.             }
  159.             break;
  160.           case AuditLogEvent.ChannelDelete:
  161.             if (auditLogEntry.target instanceof GuildChannel) {
  162.               embed.setDescription(
  163.                 `Channel deleted: ${auditLogEntry.target.name}\nType: ${ChannelType[auditLogEntry.target.type]}`,
  164.               );
  165.             }
  166.             break;
  167.           case AuditLogEvent.ChannelOverwriteCreate:
  168.             embed.setDescription(
  169.               `Channel overwrite created: ${auditLogEntry.target}`,
  170.             );
  171.             break;
  172.           case AuditLogEvent.ChannelOverwriteUpdate:
  173.             embed.setDescription(
  174.               `Channel overwrite updated: ${auditLogEntry.target}\nChanges:\n${changes("Channel")}`,
  175.             );
  176.             break;
  177.           case AuditLogEvent.ChannelOverwriteDelete:
  178.             embed.setDescription(
  179.               `Channel overwrite deleted: ${auditLogEntry.target}`,
  180.             );
  181.             break;
  182.           case AuditLogEvent.MemberKick:
  183.             embed.setDescription(`Member kicked: ${auditLogEntry.target}`);
  184.             break;
  185.           case AuditLogEvent.MemberPrune:
  186.             embed.setDescription(`Members pruned: ${auditLogEntry.extra}`);
  187.             break;
  188.           case AuditLogEvent.MemberBanAdd:
  189.             embed.setDescription(`Member banned: ${auditLogEntry.target}`);
  190.             break;
  191.           case AuditLogEvent.MemberBanRemove:
  192.             embed.setDescription(`Member unbanned: ${auditLogEntry.target}`);
  193.             break;
  194.           case AuditLogEvent.MemberUpdate:
  195.             embed.setDescription(
  196.               `Member updated: ${auditLogEntry.target}\nChanges:\n${changes("User")}`,
  197.             );
  198.             break;
  199.           case AuditLogEvent.MemberRoleUpdate:
  200.             embed.setDescription(
  201.               `Member roles updated: ${auditLogEntry.target}\nChanges:\n${changes("Role")}`,
  202.             );
  203.             break;
  204.           case AuditLogEvent.MemberMove:
  205.             embed.setDescription(`Member moved: ${auditLogEntry.target}`);
  206.             break;
  207.           case AuditLogEvent.MemberDisconnect:
  208.             embed.setDescription(
  209.               `Member disconnected: ${auditLogEntry.target}`,
  210.             );
  211.             break;
  212.           case AuditLogEvent.BotAdd:
  213.             embed.setDescription(`Bot added: ${auditLogEntry.target}`);
  214.             break;
  215.           case AuditLogEvent.RoleCreate:
  216.             if (auditLogEntry.target instanceof Role) {
  217.               embed.setDescription(
  218.                 `Role created: ${auditLogEntry.target.name}\nPermissions: ${auditLogEntry.target.permissions}`,
  219.               );
  220.             }
  221.             break;
  222.           case AuditLogEvent.RoleUpdate:
  223.             if (auditLogEntry.target instanceof Role) {
  224.               embed.setDescription(
  225.                 `Role updated: ${auditLogEntry.target.name}\nChanges:\n${changes("Role")}`,
  226.               );
  227.             }
  228.             break;
  229.           case AuditLogEvent.RoleDelete:
  230.             if (auditLogEntry.target instanceof Role) {
  231.               embed.setDescription(
  232.                 `Role deleted: ${auditLogEntry.target.name}`,
  233.               );
  234.             }
  235.             break;
  236.           case AuditLogEvent.InviteCreate:
  237.             if (auditLogEntry.target instanceof Invite) {
  238.               embed.setDescription(
  239.                 `Invite created: ${auditLogEntry.target.code}\nChannel: ${auditLogEntry.target.channel}`,
  240.               );
  241.             }
  242.             break;
  243.           case AuditLogEvent.InviteUpdate:
  244.             if (auditLogEntry.target instanceof Invite) {
  245.               embed.setDescription(
  246.                 `Invite updated: ${auditLogEntry.target.code}\nChanges:\n${changes}`,
  247.               );
  248.             }
  249.             break;
  250.           case AuditLogEvent.InviteDelete:
  251.             if (auditLogEntry.target instanceof Invite) {
  252.               embed.setDescription(
  253.                 `Invite deleted: ${auditLogEntry.target.code}`,
  254.               );
  255.             }
  256.             break;
  257.           case AuditLogEvent.WebhookCreate:
  258.             if (auditLogEntry.target instanceof Webhook) {
  259.               embed.setDescription(
  260.                 `Webhook created: ${auditLogEntry.target.name}\nChannel: ${auditLogEntry.target.channel}`,
  261.               );
  262.             }
  263.             break;
  264.           case AuditLogEvent.WebhookUpdate:
  265.             if (auditLogEntry.target instanceof Webhook) {
  266.               embed.setDescription(
  267.                 `Webhook updated: ${auditLogEntry.target.name}\nChanges:\n${changes("Webhook")}`,
  268.               );
  269.             }
  270.             break;
  271.           case AuditLogEvent.WebhookDelete:
  272.             if (auditLogEntry.target instanceof Webhook) {
  273.               embed.setDescription(
  274.                 `Webhook deleted: ${auditLogEntry.target.name}`,
  275.               );
  276.             }
  277.             break;
  278.           case AuditLogEvent.EmojiCreate:
  279.             if (auditLogEntry.target instanceof GuildEmoji) {
  280.               embed.setDescription(
  281.                 `Emoji created: ${auditLogEntry.target.name}`,
  282.               );
  283.             }
  284.             break;
  285.           case AuditLogEvent.EmojiUpdate:
  286.             if (auditLogEntry.target instanceof GuildEmoji) {
  287.               embed.setDescription(
  288.                 `Emoji updated: ${auditLogEntry.target.name}\nChanges:\n${changes("Emoji")}`,
  289.               );
  290.             }
  291.             break;
  292.           case AuditLogEvent.EmojiDelete:
  293.             if (auditLogEntry.target instanceof GuildEmoji) {
  294.               embed.setDescription(
  295.                 `Emoji deleted: ${auditLogEntry.target.name}`,
  296.               );
  297.             }
  298.             break;
  299.           case AuditLogEvent.MessageDelete:
  300.             embed.setDescription(`Message deleted: ${auditLogEntry.target}`);
  301.             break;
  302.           case AuditLogEvent.MessageBulkDelete:
  303.             embed.setDescription(
  304.               `Bulk messages deleted: ${auditLogEntry.extra}`,
  305.             );
  306.             break;
  307.           case AuditLogEvent.MessagePin:
  308.             embed.setDescription(`Message pinned: ${auditLogEntry.target}`);
  309.             break;
  310.           case AuditLogEvent.MessageUnpin:
  311.             embed.setDescription(`Message unpinned: ${auditLogEntry.target}`);
  312.             break;
  313.           case AuditLogEvent.IntegrationCreate:
  314.             if (auditLogEntry.target instanceof Integration) {
  315.               embed.setDescription(
  316.                 `Integration created: ${auditLogEntry.target.name}`,
  317.               );
  318.             }
  319.             break;
  320.           case AuditLogEvent.IntegrationUpdate:
  321.             if (auditLogEntry.target instanceof Integration) {
  322.               embed.setDescription(
  323.                 `Integration updated: ${auditLogEntry.target.name}\nChanges:\n${changes("Integration")}`,
  324.               );
  325.             }
  326.             break;
  327.           case AuditLogEvent.IntegrationDelete:
  328.             if (auditLogEntry.target instanceof Integration) {
  329.               embed.setDescription(
  330.                 `Integration deleted: ${auditLogEntry.target.name}`,
  331.               );
  332.             }
  333.             break;
  334.           case AuditLogEvent.StageInstanceCreate:
  335.             if (auditLogEntry.target instanceof StageInstance) {
  336.               embed.setDescription(
  337.                 `Stage instance created: ${auditLogEntry.target.topic}`,
  338.               );
  339.             }
  340.             break;
  341.           case AuditLogEvent.StageInstanceUpdate:
  342.             if (auditLogEntry.target instanceof StageInstance) {
  343.               embed.setDescription(
  344.                 `Stage instance updated: ${auditLogEntry.target.topic}\nChanges:\n${changes("StageInstance")}`,
  345.               );
  346.             }
  347.             break;
  348.           case AuditLogEvent.StageInstanceDelete:
  349.             if (auditLogEntry.target instanceof StageInstance) {
  350.               embed.setDescription(
  351.                 `Stage instance deleted: ${auditLogEntry.target.topic}`,
  352.               );
  353.             }
  354.             break;
  355.           case AuditLogEvent.StickerCreate:
  356.             if (auditLogEntry.target instanceof Sticker) {
  357.               embed.setDescription(
  358.                 `Sticker created: ${auditLogEntry.target.name}`,
  359.               );
  360.             }
  361.             break;
  362.           case AuditLogEvent.StickerUpdate:
  363.             if (auditLogEntry.target instanceof Sticker) {
  364.               embed.setDescription(
  365.                 `Sticker updated: ${auditLogEntry.target.name}\nChanges:\n${changes("Sticker")}`,
  366.               );
  367.             }
  368.             break;
  369.           case AuditLogEvent.StickerDelete:
  370.             if (auditLogEntry.target instanceof Sticker) {
  371.               embed.setDescription(
  372.                 `Sticker deleted: ${auditLogEntry.target.name}`,
  373.               );
  374.             }
  375.             break;
  376.           case AuditLogEvent.GuildScheduledEventCreate:
  377.             if (auditLogEntry.target instanceof GuildScheduledEvent) {
  378.               embed.setDescription(
  379.                 `Scheduled event created: ${auditLogEntry.target.name}`,
  380.               );
  381.             }
  382.             break;
  383.           case AuditLogEvent.GuildScheduledEventUpdate:
  384.             if (auditLogEntry.target instanceof GuildScheduledEvent) {
  385.               embed.setDescription(
  386.                 `Scheduled event updated: ${auditLogEntry.target.name}\nChanges:\n${changes("Guild")}`,
  387.               );
  388.             }
  389.             break;
  390.           case AuditLogEvent.GuildScheduledEventDelete:
  391.             if (auditLogEntry.target instanceof GuildScheduledEvent) {
  392.               embed.setDescription(
  393.                 `Scheduled event deleted: ${auditLogEntry.target.name}`,
  394.               );
  395.             }
  396.             break;
  397.           default:
  398.             embed.setDescription(
  399.               `Unhandled audit log event: ${auditLogEntry.action}`,
  400.             );
  401.             break;
  402.         }
  403.  
  404.         const logChannel = guild.channels.cache.get("1031369807859302400");
  405.         if (logChannel && logChannel.isTextBased()) {
  406.           logChannel.send({ embeds: [embed] });
  407.         }
  408.       },
  409.     );
  410.   }
  411. }
  412.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Falfegog
    26 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment