From 219a5ebb70146877bd484d4963ea58d39d78f07d Mon Sep 17 00:00:00 2001 From: Sky Date: Tue, 16 Apr 2024 02:05:45 +0200 Subject: [PATCH] :zap: Warn Skript when using the new async effects --- .../disky/elements/effects/retrieve/RetrieveMember.java | 2 ++ .../disky/elements/effects/retrieve/RetrieveMessage.java | 2 ++ .../disky/elements/effects/retrieve/RetrieveMessages.java | 2 ++ .../disky/elements/effects/retrieve/RetrieveOwner.java | 2 ++ .../disky/elements/effects/retrieve/RetrieveProfile.java | 2 ++ .../disky/elements/effects/retrieve/RetrieveSticker.java | 2 ++ .../disky/elements/effects/retrieve/RetrieveStickers.java | 2 ++ .../disky/elements/effects/retrieve/RetrieveThreadMembers.java | 2 ++ .../disky/elements/effects/retrieve/RetrieveThreads.java | 2 ++ .../itsthesky/disky/elements/effects/retrieve/RetrieveUser.java | 2 ++ 10 files changed, 20 insertions(+) diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMember.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMember.java index ce37f9be..a6b6db95 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMember.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMember.java @@ -29,6 +29,8 @@ public class RetrieveMember extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprID = (Expression) expressions[0]; exprGuild = (Expression) expressions[1]; exprBot = (Expression) expressions[2]; diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMessage.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMessage.java index 6b2ed56f..e5f24817 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMessage.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMessage.java @@ -29,6 +29,8 @@ public class RetrieveMessage extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprID = (Expression) expressions[0]; exprChannel = (Expression) expressions[1]; exprBot = (Expression) expressions[2]; diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMessages.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMessages.java index 476197b5..9f80e60c 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMessages.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveMessages.java @@ -40,6 +40,8 @@ public class RetrieveMessages extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, Kleenean kleenean, SkriptParser.ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprAmount = (Expression) expressions[0]; exprChannel = (Expression) expressions[1]; exprResult = (Expression) expressions[2]; diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveOwner.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveOwner.java index 93686c4f..493003c3 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveOwner.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveOwner.java @@ -27,6 +27,8 @@ public class RetrieveOwner extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprGuild = (Expression) expressions[0]; exprResult = (Expression) expressions[1]; return Changer.ChangerUtils.acceptsChange(exprResult, Changer.ChangeMode.SET, Member.class); diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveProfile.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveProfile.java index cee34ac9..f51a6d6b 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveProfile.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveProfile.java @@ -33,6 +33,8 @@ public class RetrieveProfile extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprID = (Expression) expressions[0]; exprUser = (Expression) expressions[1]; exprResult = (Expression) expressions[2]; diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveSticker.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveSticker.java index 6bcedbd7..649b4525 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveSticker.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveSticker.java @@ -35,6 +35,8 @@ public class RetrieveSticker extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprID = (Expression) expressions[0]; exprGuild = (Expression) expressions[1]; exprBot = (Expression) expressions[2]; diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveStickers.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveStickers.java index e4d18bef..a83a5336 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveStickers.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveStickers.java @@ -34,6 +34,8 @@ public class RetrieveStickers extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprGuild = (Expression) expressions[0]; exprBot = (Expression) expressions[1]; exprResult = (Expression) expressions[2]; diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveThreadMembers.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveThreadMembers.java index e88f8f7e..0042c556 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveThreadMembers.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveThreadMembers.java @@ -36,6 +36,8 @@ public class RetrieveThreadMembers extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprChannel = (Expression) expressions[0]; exprBot = (Expression) expressions[1]; exprResult = (Expression) expressions[2]; diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveThreads.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveThreads.java index 703a8e32..a49ff06a 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveThreads.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveThreads.java @@ -38,6 +38,8 @@ public class RetrieveThreads extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprGuild = (Expression) expressions[0]; exprBot = (Expression) expressions[1]; exprResult = (Expression) expressions[2]; diff --git a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveUser.java b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveUser.java index ee6e18cb..ce20dce9 100644 --- a/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveUser.java +++ b/src/main/java/info/itsthesky/disky/elements/effects/retrieve/RetrieveUser.java @@ -31,6 +31,8 @@ public class RetrieveUser extends AsyncEffect { @Override public boolean init(Expression[] expressions, int i, @NotNull Kleenean kleenean, SkriptParser.@NotNull ParseResult parseResult) { + getParser().setHasDelayBefore(Kleenean.TRUE); + exprInput = (Expression) expressions[0]; exprBot = (Expression) expressions[1]; exprResult = (Expression) expressions[2];