Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Made GenericChannel IMentionable
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshiCodes committed Jun 9, 2023
1 parent 486c75b commit 3bee0f3
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import com.google.gson.JsonObject;
import de.joshicodes.rja.RJA;
import de.joshicodes.rja.object.IMentionable;
import de.joshicodes.rja.object.message.MessageReceiver;
import de.joshicodes.rja.rest.RestAction;
import de.joshicodes.rja.util.JsonUtil;

public abstract class GenericChannel extends MessageReceiver {
public abstract class GenericChannel extends MessageReceiver implements IMentionable {

public static GenericChannel from(final RJA rja, final JsonObject object) {
final String type = JsonUtil.getString(object, "channel_type", null);
Expand Down Expand Up @@ -37,4 +38,9 @@ public static GenericChannel from(final RJA rja, final JsonObject object) {

abstract public ChannelType getType();

@Override
public String getAsMention() {
return "<#" + getId() + ">";
}

}

0 comments on commit 3bee0f3

Please sign in to comment.