Greasy Fork is available in English.

Discussions » Demandes de création de scripts

Auto add +1 to a embeded reaction poll on discord

§
Posté le: 06/05/2021
Édité le: 06/05/2021

IF someone can help me write this script i Just started java, i would need a script that when a certain type of message is posted by a discord bot to auto add the avalible reaction posted by the Bot, the first one, i can not specify it cause its random, Just the embeded reaction made by the Bot. The key Word of this message is react airdrop, if someone could write this for me or forward me in the right direction i would BE thankfull, might even pay for it

§
Posté le: 07/05/2021
Édité le: 07/05/2021

I guess that by java you mean javascript...

I guess that if you learn about mutation observers you will be able to do what you want.

        new MutationObserver(async function() {
          //Add the +1 reaction
        }).observe(document.querySelector("element_where_the_messages_are_posted"), {
          attributes: true,
          attributeOldValue: true,
          characterData: true,
          characterDataOldValue: true,
          childList: true,
          subtree: true
        });
§
Posté le: 08/05/2021

I guess that by java you mean javascript...

I guess that if you learn about mutation observers you will be able to do what you want.

        new MutationObserver(async function() {
          //Add the +1 reaction
        }).observe(document.querySelector("element_where_the_messages_are_posted"), {
          attributes: true,
          attributeOldValue: true,
          characterData: true,
          characterDataOldValue: true,
          childList: true,
          subtree: true
        });

Yeah i was cappin hard when i said i actually am learning, i have 0 knowledge about coding lol, if you could simplify this for me xd

§
Posté le: 08/05/2021

Erase
//Add the +1 reaction

Replace that with the codes to add the +1 reaction

Erase
element_where_the_messages_are_posted

And replace that with the query,element name/id of the element_where_the_messages_are_posted

Poster une réponse

Connectez-vous pour poster une réponse.