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
43 stars 12 forks source link

Multiple event-values missing in several events #134

Closed sluhtie closed 1 year ago

sluhtie commented 1 year ago

I tested the on message receive/delete/edit events and noticed that although the message gets cached correctly following issues occur:

on message delete:
- event-string returns none
- event-message returns none

on message edit:
- event-string returns none

Code I have used:

on message receive:
    broadcast "---> MESSAGE SEND"
    broadcast "%event-user%"
    broadcast "%event-guild%"
    broadcast "%event-newschannel%"
    broadcast "%event-guildchannel%"
    broadcast "%event-member%"
    broadcast "%event-bot%"
    broadcast "%event-textchannel%"
    broadcast "%event-privatechannel%"
    broadcast "%event-message%"
    broadcast "%event-threadchannel%"

on message edit:
    broadcast "---> MESSAGE EDITED"
    broadcast "%event-guild%"
    broadcast "%event-newschannel%"
    broadcast "%event-guildchannel%"
    broadcast "%event-bot%"
    broadcast "%event-textchannel%"
    broadcast "%event-privatechannel%"
    broadcast "%event-message%"
    broadcast "%event-string%"
    broadcast "%event-threadchannel%"

on message delete:
    broadcast "---> MESSAGE DELETED"
    broadcast "%event-guild%"
    broadcast "%event-newschannel%"
    broadcast "%event-number%"
    broadcast "%event-guildchannel%"
    broadcast "%event-bot%"
    broadcast "%event-textchannel%"
    broadcast "%event-privatechannel%"
    broadcast "%event-message%"
    broadcast "%event-string%"
    broadcast "%event-threadchannel%"

Responses I have received with testing: grafik

sluhtie commented 1 year ago

I also noticed that there is no event-member when firing either the message delete/receive or edit event. In the on guild ban event a event-reason such as event-operator would be useful aswell. grafik

sluhtie commented 1 year ago

When I'm already at it I may also suggest aother useful event:

Events:
1. on member stop boost:

There are also some missing values in boosting https://ci.dv8tion.net/job/JDA/javadoc/net/dv8tion/jda/api/events/guild/update/GuildUpdateBoostCountEvent.html

TBAProgramming commented 1 year ago

look

ItsTheSky commented 1 year ago

look

?

ItsTheSky commented 1 year ago

Hey there 👋

First, Are the messages that return none for the different event-value cached in DiSky? you can see that by enabling the debug mode in the configuration. It'll send a message every time a message is cached with its ID and content


retrieved values can be accessed using the retrieve event value effect (https://disky.me/wiki/docs/effects/#retrieveeventvalue). The most common available value for any log-related event (aka any event that adds an audit log to the guild's logs) is author, and it'll be the actual author of the action (the user who banned someone for instance). I hope I was clear!

For any time-related values (such as previous boost count or tier), you'll have to use Skript's temporal system. For instance, you can get the previous boost tier using past event-string, or past event-integer for the previous boost count.

I know this is not suitable for comprehension to have such weird name for event values, however, that's how Skript works and I cannot do anything against that.

For the last one, that you also quoted in your last message, I don't think I miss any value, as I can only get the guild, previous and new values. Correct me if I'm wrong tho!


The event you suggested should be added in the next release, aka v4.12.0! Thanks for it :)

Okay, small typo: the suggested event seems to already exists: https://disky.me/wiki/docs/events/#on-member-boost-event This fire when a member stop or continue it's boosting time. In order to check if it's ended, the new value (aka event-date I think) should be not set (none).

sluhtie commented 1 year ago

Hey, yes. I already enabled debugging and the messages get cached indeed. (See Screenshot of Terminal)

Also, shouldn't there be some way to get the member that boosted the server then?!

Ps. Thanks for adding that event :)

ItsTheSky commented 1 year ago

Well according to https://ci.dv8tion.net/job/JDA/javadoc/net/dv8tion/jda/api/events/guild/update/GuildUpdateBoostCountEvent.html, I don't think it's possible :/

sluhtie commented 1 year ago

Mhhh any work around? I mean there must be some way to have a var with the amount a user boosted the server

ItsTheSky commented 1 year ago

Not to my knowledge, although you can "cheat" by getting the system message sent when someone boosts maybe?

sluhtie commented 1 year ago

I know theres a bot that counts the boosts of a user. https://boosterbot.xyz/ I wonder how they did it