iBlitzkriegi / Vixio

Vixio, The Skript Addon made to fit all of your Discord needs.
http://www.vixio.space
40 stars 28 forks source link

Remove Emote by User - Syntax won't work. #303

Open IlasRandomProjects opened 3 years ago

IlasRandomProjects commented 3 years ago

Describe the bug Vixio won't remove reactions even with permissions.

To Reproduce My code:

discord command shop:
    prefixes: .
    trigger:
        botCheckVariables(discord id of event-user)
        create embed:
            set the title of embed to title with text "Statistics of %event-user%"
            set the description of embed to "There you go."
            add split field named "PRODUCTION" with value "bla bla" to embed
            add split field named "PROFILE" with value "bla bla" to embed
            add split field named "EMPIRE" with value "bla bla" to embed
        send the last created embed to event-channel with event-bot and store it in {_temp}
        add reaction "x" to {_temp} with event-bot
        set {_id} to discord id of {_temp}
        set {bot::messages::%{_id}%::owner} to discord id of event-user

on reaction added:
    discord id of event-user is not discord id of event-bot
    discord id of the author of event-message is discord id of event-bot
    if {bot::messages::%discord id of event-message%::owner} is discord id of event-user:
        if "%event-emote%" = "❌":
            delete event-message with event-bot
    remove event-emote added by event-user from event-message

Information Skript version: 2.5.3 Vixio version: v2.0.7 Minecraft Version: 1.16 Server software name and version: Spigot 1.16

Expected behavior Vixio had to remove the emote.

Additional context A thing that I noticed: if the emote is the X (:x:) it deletes the message as the code says, but it doesn't remove other emotes.

IlasRandomProjects commented 3 years ago

Update: I noticed that if I use this code

on reaction added:
    remove event-emote added by event-user from event-message

it removes the emote from the message, BUT only for the first one. It won't remove the second, third, .... emote.

[ I DON'T THINK IT'S RELATED TO THE BUG ABOVE ]