Comments (13)
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.
Are you using a user account or a bot account? Only "real" users can accept invites.
from javacord.
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.
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.
nevermind sending messages does work thought but the account i was testing on needed its email verified going to check acceptInvite now
from javacord.
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.
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.
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.
the onSuccess nor the onFailure is being called for me. my account is only in 1 server.
from javacord.
yeah it still is doing it.
from javacord.
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.
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.
Ah makes sense, thanks @W-O-A-H
from javacord.
Related Issues (20)
- Move from deprecated channel_id to new interaction channel field
- Couldn't handle packet of type VOICE_STATE_UPDATE
- Add voice message support to text channel
- Add super reactions
- Slash Commands issue HOT 11
- Replacement/just removal and deprecation of `getDiscriminatedName ` HOT 8
- Add role flags HOT 1
- Add attachment flags HOT 1
- Add the message author id to message reaction events HOT 1
- Add user avatar decorations
- SlashCommandOptionChoice#getLongValue returns a empty optional despite a long value being present on DAPI HOT 2
- `ServerThreadChannelCreateListener` dispatching twice.
- Parameters are ignored when requesting archived threads
- Look through the code for non thread safe collections
- Add default select menu values HOT 1
- Add support for premium app subscriptions
- Add resolved field to message components
- Fix Embed* implementation methods returning null instead of optional
- Continuous switching between the voice channels.
- Ability to set message flags for any message to send (not only for interaction messages)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javacord.