DiSkyOrg / DiSky

The best Skript add-on for Discord management! Slash commands, interaction, components, modal and much more available!
https://disky.me/
Apache License 2.0
42 stars 12 forks source link

Lots of mistakes.. 4.14.1 #179

Closed Wujek0 closed 4 months ago

Wujek0 commented 4 months ago

image Links from image:

  1. Strange situation... edit event-message to show {_msg} doesn't work, but retrieve message with id discord id of event-message in event-channel and store it in {_message} and then edit {_message } to show {_msg} works, even though the whole thing is the same...
  2. parsed as member and parsed as guildchannel do not work at all
  3. When using send a "POST" request to send a webhook, temporary variables are reset and the webhook sends "<none>" instead of the appropriate message. Sample code for point 3:
    on message received:
    set {_message} to "%event-message%"
    broadcast {_message} #shows correct content
    send a "POST" request to "https://discord.com/api/webhooks/123-webhook-id-456/idk" with body "{""content"": ""%{_message}%"", ""embeds"": null,""username"": ""%discord name of event-member%"","avatar_url"": ""%event-member's avatar%"","attachments"": []}" and headers "User-Agent: 1" and "Content-Type: application/json" #sends a webhook message with the content "<none>"

Many things that work in 4.12.2-beta1 don't work in 4.14.1 as they should.

//Edit: + every few seconds/minutes the console displays the message Can't keep up! Is the server overloaded? Running 4473ms or 89 ticks behind which was not available on DiSky 4.12.2-beta1

Mushkrem commented 4 months ago
  1. Is not supposed to happen, and should be addressed
  2. That's a feature, not a bug.
  3. I doubt it's related to Disky, was it working on the previous Disky version?

As to Can't keep up! Is the server overloaded? Running 4473ms or 89 ticks behind, try running timings, then send them here.

ItsTheSky commented 4 months ago

For the edit effect (and it appears the reply effect was also impacted), this will be fixed in 4.14.2 (basically, you cannot edit the message in an interaction, you can only edit its interaction itself. Retrieving the message will "consider" that message as "real" message, instead of an "interaction message", not sure if it was clear)

ItsTheSky commented 4 months ago

As @Mushkrem said, parsed as is not a bug, they were never meant to work this way. Use getters or retrievers to get those entities. For the Can't keep up! Is the server overloaded? Running 4473ms or 89 ticks behind message, it seems weird, as all the code is executed in another thread (according to Skript's developers), thus it should not impact the server's thread (that should cause this message to appear). Maybe more investigation has to be done about this, but I don't have enough variables to do something with it.

If this message stills shows, re-open an issue describing the potential code involved

Wujek0 commented 4 months ago

https://spark.lucko.me/g58KkK8Pcn The timings you asked for are available at this link. The delay message appeared only after updating DiSky from version 4.12.1 to version 4.14.1

EquipableMC commented 4 months ago

Have you tried with 4.14.3?

Wujek0 commented 4 months ago

Yes, this problem still occurs