#JDA Help

1 messages · Page 1 of 1 (latest)

deft egret
#

I'm trying to install JDA which has dv8tion but 5.0 and newer versions don't support what I need

Are there any 4.**** versions which will work?

This is my current error:

[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException```
tardy cargoBOT
# deft egret I'm trying to install JDA which has dv8tion but 5.0 and newer versions don't sup...

Detected code, here are some useful tools:

Formatted code
[ERROR] Failed to execute goal on project discordbot : Could not resolve dependenciesfor project com.mybot : discordbot : jar : 1.0 - SNAPSHOT : The following artifacts could not be resolved : net.dv8tion : JDA : jar : 4.0.0_52(absent) : Could not find artifact net.dv8tion : JDA : jar : 4.0.0_52in jitpack.io(https : //jitpack.io) -> [Help 1]
[ERROR] [ERROR] To see the full stack trace of the errors, re - run Maven with the - eswitch .[ERROR] Re - run Maven using the - Xswitch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles : [ERROR] [Help1] http : //cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
#

<@&987246924425994290> please have a look, thanks.

tardy cargoBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

deft egret
#

@shell aspen

#

would you be able to help with this please?

shell aspen
ruby oar
#

click through the different tabs and you can see on what repositories different versions are on

#

I see a 4.* on spring lib releases

wide fern
#

What is it that you need that isn't in the latest version?

deft egret
#

but my application commands

#

aren't working

#

it should show with the /move command here but it doesn't

shell aspen
deft egret
# shell aspen show ur code where u update the slash commands
        // Register the /move slash command
        builder.upsertCommand("move", "Move a channel to a specified category")
               .addOption(OptionType.STRING, "category", "The category to move the channel to", true)
               .queue();

        builder.addEventListeners(new App()).build();```
#

or this possibly

#
    @Override
    public void onSlashCommand(SlashCommandEvent event) {
        if (event.getName().equals("move")) {
            long interactionId = event.getIdLong();
            
            // Check if this interaction has already been processed
            if (processedInteractions.contains(interactionId)) {
                return;
            }

            // Mark this interaction as processed
            processedInteractions.add(interactionId);
            
            // Acknowledge the command immediately
            event.deferReply(true).queue();
            
            String categoryName = event.getOption("category").getAsString();
            
            // Implement your logic to move the channel to the specified category here
            Guild guild = event.getGuild();
            TextChannel channel = event.getTextChannel();
            
            // Check if the category ID is valid
            if (ALLOWED_CATEGORIES.containsKey(categoryName)) {
                String categoryId = ALLOWED_CATEGORIES.get(categoryName);
                Category category = guild.getCategoryById(categoryId);
                
                // Check if the category is not null
                if (category != null) {
                    channel.getManager().setParent(category).queue(
                        success -> event.getHook().sendMessage("Channel moved to " + categoryName).queue(),
                        failure -> event.getHook().sendMessage("Failed to move channel!").queue()
                    );
                } else {
                    event.getHook().sendMessage("Invalid category ID!").queue();
                }
            } else {
                event.getHook().sendMessage("Invalid category name!").queue();
            }
        }
    }
}```
#

I've got this import aswell: import net.dv8tion.jda.api.events.interaction.SlashCommandEvent;

#

@shell aspen

shell aspen
#

im eating

deft egret
#

okay nw

smoky pawn
# deft egret <@494830783765151754>

just as a general note, u really don't have to do the pinging. u might think people forgot u, but thats not the case. in fact, many people observe each single message in ur thread and will respond when they have the time. also please remember that people here are not paid to help, they are free to come and go as they please.
in any case, u don't have to fear being forgotten or ignored, that won't happen

deft egret
#

Or like a for hire channel?

smoky pawn
deft egret
smoky pawn
#

u will definetly get it sorted out and we will assist all the way through, don't worry. u just gotta bring a bit of patience. most helpers are also european time and the day here just started 🙂

shell aspen
#

is the bot online?

deft egret
#

I did url generator and did both + the application.commands or whatever

shell aspen
#

try kicking the bot and re-inviting it

deft egret
#

when inviting

#

I did

#

I have a few python files running before that

#

which have other scripts

#

do I need to turn all of them off completely

#

so the bot goes offline then re-invite

#

then put the bot online?

shell aspen
deft egret
#

ah

#

okay

deft egret
#

I stopped all my scripts

#

and put it up

shell aspen
#

try re inviting the bot

deft egret
#

hey @shell aspen

#

for this

#

do I only enable applications.commands

#

or all the other applications. aswell?

shell aspen
deft egret
#

okay

deft egret
#

still doesn't work

#

I turned the bot offline

#

kicked it

#

put it up

#

then re-invited

shell aspen
#

@deft egret do u have nothing in server settings > integration

#

?

shell aspen
deft egret
#

yep

shell aspen
#

also which jda version u using?

deft egret
#

uhm

#

let me have a look

#

4.13.2

deft egret
#

or send you my current code

#

cause /move works without the application commands thing

#

it does what it's "'meant" to do

shell aspen
deft egret
#

but it doesn't show in the command application thing

deft egret
shell aspen
#

i don't think so

#

just use latest jda

deft egret
#

it was being weird

#

could you give me a version to use please

#

and I'll try it out

#

one that you recommend

shell aspen
deft egret
#

@shell aspen

#

this is the error I get with most 5+ versions

#
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException```
shell aspen
#

show ur build script

deft egret
#

in my pom.xml file

deft egret
#

edit here instead?

#

@shell aspen I really need to go soon and would love to get this sorted :3

#

if you're available

hidden marsh
#

@deft egret show your full pom
Also what is the feature that jda 5 doesn't support?

shell aspen
# deft egret

u don't have to set junit to that version only jda

#

give ur full pom

deft egret
#

in school

deft egret
# shell aspen give ur full pom

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mybot</groupId>
<artifactId>discordbot</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>discordbot</name>
<url>http://maven.apache.org</url>

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>net.dv8tion</groupId>
        <artifactId>JDA</artifactId>
        <version>5.0.0-alpha.1</version>
    </dependency>

    <!-- Added JUnit 4 dependency -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>5.0.0-beta.13</version> <!-- You can use a different version if needed -->
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- Specify the main class here -->
<archive>
<manifest>
<mainClass>com.mybot.App</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

#

@hidden marsh

tardy cargoBOT
# deft egret <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://ww...

Detected code, here are some useful tools:

Formatted code
 < project xmlns = "http://maven.apache.org/POM/4.0.0"xmlns : xsi = "http://www.w3.org/2001/XMLSchema-instance"xsi : schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" > <modelVersion> 4.0.0 <  / modelVersion > <groupId> com.mybot <  / groupId > <artifactId> discordbot <  / artifactId > <packaging> jar <  / packaging > <version> 1.0 - SNAPSHOT <  / version > <name> discordbot <  / name > <url> http : //maven.apache.org</url>
<repositories> <repository> <id> jitpack.io <  / id > <url> https : //jitpack.io</url>
 <  / repository >  <  / repositories > <dependencies> <dependency> <groupId> net.dv8tion <  / groupId > <artifactId> JDA <  / artifactId > <version> 5.0.0 - alpha.1 <  / version >  <  / dependency >  < !--Added JUnit4dependency-- > <dependency> <groupId> junit <  / groupId > <artifactId> junit <  / artifactId > <version> 4.13.2 <  / version > <scope> test <  / scope >  <  / dependency >  <  / dependencies > <build> <plugins> <plugin> <groupId> org.apache.maven.plugins <  / groupId > <artifactId> maven - assembly - plugin <  / artifactId > <version> 5.0.0 - beta.13 <  / version >  < !--You can use a different versionif needed-- > <executions> <execution> <id> make - assembly <  / id > <phase> package  <  / phase > <goals> <goal> single <  / goal >  <  / goals > <configuration> <descriptorRefs> <descriptorRef> jar - with - dependencies <  / descriptorRef >  <  / descriptorRefs >  < !--Specify the mainclass here-- > <archive> <manifest> <mainClass> com.mybot.App <  / mainClass >  <  / manifest >  <  / archive >  <  / configuration >  <  / execution >  <  / executions >  <  / plugin >  <  / plugins >  <  / build >  <  / project >
shell aspen
deft egret
shell aspen
# deft egret wdym
    <repository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
#

inside respositories