Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move canTalk() from GuildMessageChannel to MessageChannel #1956

Merged
merged 3 commits into from
Dec 24, 2021
Merged

Move canTalk() from GuildMessageChannel to MessageChannel #1956

merged 3 commits into from
Dec 24, 2021

Conversation

V-Play-Games
Copy link
Contributor

@V-Play-Games V-Play-Games commented Dec 19, 2021

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: #1920

Description

Move the canTalk() method from GuildMessageChannel to MessageChannel, which calls for an implementation in PrivateChannel since GuildMessageChannel already has a default one.
For that, I simply use the condition used in the private checkBot() method
This is my first ever pull request for this repository, so please tell me if I am doing anything wrong here, ty

@Override
public boolean canTalk()
{
return !getUser().isBot() || getJDA().getAccountType() != AccountType.BOT;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bots can talk in dms?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it with true since it's possible

@MinnDevelopment MinnDevelopment added this to In progress in v5 Dec 19, 2021
@MinnDevelopment MinnDevelopment moved this from In progress to Review in progress in v5 Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v5
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants