Skip to content

Commit

Permalink
⚡ Warn Skript when using the new async effects
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsTheSky committed Apr 16, 2024
1 parent 8e5bc2b commit 219a5eb
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) expressions[0];
exprGuild = (Expression<Guild>) expressions[1];
exprBot = (Expression<Bot>) expressions[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) expressions[0];
exprChannel = (Expression<MessageChannel>) expressions[1];
exprBot = (Expression<Bot>) expressions[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Number>) expressions[0];
exprChannel = (Expression<MessageChannel>) expressions[1];
exprResult = (Expression<Object>) expressions[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Guild>) expressions[0];
exprResult = (Expression<Object>) expressions[1];
return Changer.ChangerUtils.acceptsChange(exprResult, Changer.ChangeMode.SET, Member.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) expressions[0];
exprUser = (Expression<User>) expressions[1];
exprResult = (Expression<Object>) expressions[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) expressions[0];
exprGuild = (Expression<Guild>) expressions[1];
exprBot = (Expression<Bot>) expressions[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Guild>) expressions[0];
exprBot = (Expression<Bot>) expressions[1];
exprResult = (Expression<Object>) expressions[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ThreadChannel>) expressions[0];
exprBot = (Expression<Bot>) expressions[1];
exprResult = (Expression<Object>) expressions[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Guild>) expressions[0];
exprBot = (Expression<Bot>) expressions[1];
exprResult = (Expression<Object>) expressions[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) expressions[0];
exprBot = (Expression<Bot>) expressions[1];
exprResult = (Expression<Object>) expressions[2];
Expand Down

0 comments on commit 219a5eb

Please sign in to comment.