trungking / Discord - I like spammer

// ==UserScript==
// @name         Discord - I like spammer
// @namespace    acbpro.discord.spam
// @version      2024-10-26
// @description  Simple script to auto click "show message" for "message hidden likely from spammer
// @author       You
// @match        https://discord.com/channels/*
// @match        https://discord.com/app
// @icon         https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @grant        none
// @downloadURL https://openuserjs.org/install/trungking/Discord_-_I_like_spammer.user.js
// @updateURL https://openuserjs.org/meta/trungking/Discord_-_I_like_spammer.meta.js
// @copyright 2024, trungking (https://openuserjs.org/users/trungking)
// @license MIT
// ==/UserScript==

(function () {
  'use strict';

  // Function to click "Show message" buttons
  function clickShowMessageButtons() {
    // Get all buttons on the page
    const buttons = document.querySelectorAll('span');

    // Loop through each button
    buttons.forEach(button => {
      // Check if the button text is "Show message" or "Show messages"
      if (button.textContent.trim() === "Show message" || button.textContent.trim() === "Show messages") {
        button.click();
      }
    });
  }

  // Run the function every 2 seconds
  setInterval(clickShowMessageButtons, 1000);
})();