Discord4Fabric

Discord4Fabric

683 Downloads

[Feature request] Linked account constraint for discord_message

gadget78 opened this issue ยท 7 comments

commented

on "custom_events" with the event "discord_message" using any constant..
even a simple setup like..

{
  "discord_message": {
    "requires": [
      "linked_account"
    ],
    "actions": [
      {
        "id": "send_discord_message",
        "value": "this is a linked account"
      }
    ]
  }
}

gives the error (in console)
One of the EventListeners had an uncaught exception

( also theres a incorrect line in the customevents.md
theres two linked_account_nick_contains 2nd one needs to be linked_account_has_role
seems silly for me to to do a PR for that..)

also, it seems you cannot have more that one of the same events ?.. (so two "minecraft_message": )
the second seems to get a Chain link failed, continuing to next one error (still testing to pinpoint if its specific to two minecraft_messages events))

commented
  1. linked_account means to check if the MC account has a linked Discord account, not the other way around, although I plan to add the other way around in the future
  2. Thanks for the catch in the docs! Appreciate it!
  3. You can have more than one function on the same event, like this:
"event_id": [
    {  
        // func 1
    },
    { 
        // func 2
    }
]
commented

1.would that also add the %linked_account** type placeholders: to the discord_message action to ?
3.arr ok that makes sense thankyou, will give that ago

also would it be alot of work to add a "embed" style action ( send_discord_embed ?)
(like the join/leave messages etc that are sent in discord)

commented

Added to the checklist

commented

Adding ! to the start of any constraint negates it by default, or did it break?

commented

can !negated_ be added to all the constraints ?
only recently noticed this as even a option in the readme !.. great feature !
but trying to use it gets a Chain link failed, continuing to next one

commented

arrr it ONLY needs the !, ok yep that works ! .. i was stupidly adding !negated_

commented

another quirk i found, is that, using your example..

    {
      "requires": [
        "mc_message('!hello')"
      ],
      "actions": [
        {
          "id": "send_minecraft_message",
          "value": "Hey there!"
        }
      ]
    }

image
the reply gets printed BEFORE the users message.....

cannot test discord like your actual example you give, as it seems ALL discord_message events seem broken ?
with One of the EventListeners had an uncaught exception ...