GithubHelp home page GithubHelp logo

Comments (13)

LogicismDev avatar LogicismDev commented on May 27, 2024 1

This still doesn't work by the way, I called the future with the callback and it shows this:
[pool-39-thread-2] INFO de.btobastian.javacord.ImplDiscordAPI - Accepted invite and waiting for listener to be called (code: *******, server id: REMOVED)

Code is similar to w-o-a-h's

from javacord.

Bastian avatar Bastian commented on May 27, 2024

Are you using a user account or a bot account? Only "real" users can accept invites.

from javacord.

0-x-2-2 avatar 0-x-2-2 commented on May 27, 2024

user account it also seems that i cant reply to messages too is this because i have more then 1 account running on the same jvm?

from javacord.

Bastian avatar Bastian commented on May 27, 2024

Can you please add a .get() after the reply() method and check which exception it throws?
Something like this:

try {
  msg.reply("Test").get();
} catch (Exception e) {
  e.printStackTrace();
}

from javacord.

0-x-2-2 avatar 0-x-2-2 commented on May 27, 2024

nevermind sending messages does work thought but the account i was testing on needed its email verified going to check acceptInvite now

from javacord.

0-x-2-2 avatar 0-x-2-2 commented on May 27, 2024

acceptInvite does not work using this code

try {
    a.acceptInvite("[REMOVED]", new FutureCallback < Server > () { //https://discord.gg/[REMOVED]
        @Override
        public void onSuccess(Server server) {
            System.out.println(server.getName());
        }

        @Override
        public void onFailure(Throwable t) {
            t.printStackTrace();
        }
    }).get();
} catch (Exception e) {
    e.printStackTrace();
}

from javacord.

Bastian avatar Bastian commented on May 27, 2024

Is there any response or a neither onSucess, nor onFailure called?
Does the user join the server or is it not working at all?

Accepted invite and waiting for listener to be called (code: [REMOVED], server id: [REMOVED])

Sounds like it joined the server (otherwise it wouldn't know the server id).
On how many servers is your account? Discord limits user accounts to 100 servers, I'm not sure what happens, when you try to exceed this limit.

from javacord.

c-wolfe avatar c-wolfe commented on May 27, 2024

I've also had this issue. The onSuccess is called but the account doesn't join the server. The user isn't in any other servers so it's not a 100 server limit.

from javacord.

0-x-2-2 avatar 0-x-2-2 commented on May 27, 2024

the onSuccess nor the onFailure is being called for me. my account is only in 1 server.

from javacord.

0-x-2-2 avatar 0-x-2-2 commented on May 27, 2024

yeah it still is doing it.

from javacord.

Bastian avatar Bastian commented on May 27, 2024

I just did some testing and it seems like Discord changed how invites are accepted by clients.
Client accounts are not offically recommended by Discord (in fact they are not allowed at all) and I guess they intentionally changed this as automatic accepting of invites can easily be abused for spam bots etc.
So I'm not sure if I should really update to the new behaviour (which would also need some reverse engineering as there's no documentation about the client api) or just remove this functionality.

from javacord.

0-x-2-2 avatar 0-x-2-2 commented on May 27, 2024

https://discordapp.com/api/v6/invite/{CODE}

Set "authorization" in the header to the token and send it as a post request.

Response:
{"inviter": {"username": "{REMOVED}", "discriminator": "{REMOVED}", "id": "{REMOVED}", "avatar": "{REMOVED}"}, "code": "{REMOVED}", "guild": {"verification_level": 0, "features": [], "name": "{REMOVED}", "splash": null, "id": "{REMOVED}", "icon": "{REMOVED}"}, "channel": {"type": 0, "id": "{REMOVED}", "name": "{REMOVED}"}}

then it just worked.

from javacord.

LogicismDev avatar LogicismDev commented on May 27, 2024

Ah makes sense, thanks @W-O-A-H

from javacord.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.