discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Apache License 2.0
4.29k stars 738 forks source link

Discord Integration for Minecraft (lol) #1381

Closed Atlas7005 closed 4 years ago

Atlas7005 commented 4 years ago

Question

Hey, I'm a fairly new Java developer who has experience in Javascript, Lua & a little C#... I'm trying to create a Minecraft Client with Discord Integration using JDA, but since 4.2.0 has removed AccountType.CLIENT I am forced to use 4.1.1 (I think it is, anyway it's the second latest release) but in using that, there is some issues with some of the methods and such...

I'm trying to use the getTextChannelById() but it always seems to return null... I assume this is because of using an outdated version and all that, anyone knows of a better way to do this without using something less efficient please share, and I really am trying to avoid webhooks or bots.

sebm253 commented 4 years ago

Why are you avoiding bots?

Atlas7005 commented 4 years ago

Because it's supposed to be Discord Integration for people who can chat inside Minecraft.

sebm253 commented 4 years ago

so? what's the issue in using a bot account then?

Atlas7005 commented 4 years ago

That it's not using the player's own discord account, making them unable to chat as themselves.

sebm253 commented 4 years ago

the issue is that using client accounts is prohibited, or, respectively, against discord's tos, so you gotta stick to bots

Atlas7005 commented 4 years ago

and I want to allow the user to chat in any channel in any guild that they're in without being limited to bot accounts.

Atlas7005 commented 4 years ago

Personally, I don't care what Discord ToS says... I don't have to follow ToS, I can choose to.

sebm253 commented 4 years ago

yes you have to follow discord's tos as you'd use their service, they're the ones deciding what's allowed or not. or maybe let random people use their accounts and then get them banned. check the faq

Ayfri commented 4 years ago

You can use Webhooks to simulate messages from an User Account as you can change Avatar and everything else.

Atlas7005 commented 4 years ago

@Ayfri - Problem with that is it's like how a bot account is limited. If I were to use a bot account, the admins of a guild would have to allow people to talk via the client to the guild. If I were to use a webhook, the people who can create webhooks are the only ones who can allow people to talk via the client to the guild.

Andre601 commented 4 years ago

@Ayfri - Problem with that is it's like how a bot account is limited. If I were to use a bot account, the admins of a guild would have to allow people to talk via the client to the guild. If I were to use a webhook, the people who can create webhooks are the only ones who can allow people to talk via the client to the guild.

No. Using a bot could you check a user's permissions on a Guild, see if they are connected to a MC account on the server and then either send the message or not. You have to check, if a user has a Discord account anyway if you want them to chat regardless...

Also, instead of wasting your time creating a selfbot, potentially risking a global ban by Discord, should you consider using existing resources such as DiscordSRV for a proper MC - Discord chat.

Also also, please follow the issue templates. They where created for a reason (Refer to #1337 for more info)

The tl;dr is: You won't receive any support for creating a SelfBot/UserBot using JDA as this is not allowed by Discord and no longer supported at all.

Atlas7005 commented 4 years ago

No. Using a bot could you check a user's permissions on a Guild, see if they are connected to a MC account on the server and then either send the message or not. You have to check, if a user has a Discord account anyway if you want them to chat regardless...

Also, instead of wasting your time creating a selfbot, potentially risking a global ban by Discord, should you consider using existing resources such as DiscordSRV for a proper MC - Discord chat.

Also also, please follow the issue templates. They where created for a reason (Refer to #1337 for more info)

The tl;dr is: You won't receive any support for creating a SelfBot/UserBot using JDA as this is not allowed by Discord and no longer supported at all.

This is a custom Minecraft client I'm creating, not a server, plugin, or guild.

DiscordSRV is a plugin for Minecraft servers, useless on the Client.

I picked the Question template and took out what was unnecessary.

I wasn't looking for support, I was looking for answers to a question.

JohnnyJayJay commented 4 years ago

This is a very bad idea in many regards. It's not just that client bots are prohibited by the ToS, you want to - what - just grab all the usernames and passwords of your users? Then what?

Atlas7005 commented 4 years ago

This is a very bad idea in many regards. It's not just that client bots are prohibited by the ToS, you want to - what - just grab all the usernames and passwords of your users? Then what?

I don't see how this is relevant to the question.

MCOfficer commented 4 years ago

To answer your question: getTextChannelById can be null for a number of reasons, among them

If you're looking for support, you should visit the JDA Discord.


Obligatory note regarding Selfbots:

TL;DR: Don't do selfbots, kids.

Atlas7005 commented 4 years ago

To answer your question: getTextChannelById can be null for a number of reasons, among them

  • wrong ID
  • bot is not in the same guild
  • JDA hasn't finished loading
  • possibly due to old/broke version? though 4.1 should still be okish
  • broken AccountType.CLIENT support (see below)

If you're looking for support, you should visit the JDA Discord.

Obligatory note regarding Selfbots:

  • No, it is not your choice. You are using discord, thus you have to play by their rulebook. But by all means, don't let me stop you from getting yourself banned!
  • JDA has only removed AccountType.CLIENT recently, but dropped active support over a year ago. It's most likely broken in several ways.
  • Since it's only part of an old release, it has no future. 4.1 will stop working eventually, and then your bot is useless.

TL;DR: Don't do selfbots, kids.

An actual reply, thank you.

HydroPage commented 4 years ago

Bruh

Tim203 commented 4 years ago

Just use webhooks lol. It is a pretty god alternative (and you can have the same profile picture).

lukeeey commented 4 years ago

@Atlas7005 what’s your discord username?