discord 自動點表情符號by ㄐㄐ人

會自己點表情符號 修正超級反應

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         discord 自動點表情符號by ㄐㄐ人
// @namespace    http://tampermonkey.net/
// @version      1.0.4
// @description  會自己點表情符號 修正超級反應
// @author       ㄐㄐ人
// @match        *://*.discord.com/channels/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    function autoClick() {
        // 尋找所有反應按鈕
        const reactions = document.querySelectorAll('[class*="reaction"]');

        for (const reaction of reactions) {
            // 檢查是否未被點擊且不是超級反應
            if (
                reaction.getAttribute('aria-pressed') === 'false' &&
                !reaction.getAttribute('aria-label')?.includes('超級反應')
            ) {
                reaction.click();
                console.log("已點擊反應");
                break;
            }
        }
    }

    setInterval(autoClick, 1000);
})();