-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added follow Channel method to news channel Removed channel type SERVER_STORE_CHANNEL as it was removed by discord a long time ago ServerTextChannel now extends ServerMessageChannel and so does NewsChannel This is because everything apart from slow mode is the same. Slowmode is in the interface ServerTextChannel
- Loading branch information
1 parent
175a625
commit 8423346
Showing
51 changed files
with
1,606 additions
and
784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
javacord-api/src/main/java/org/javacord/api/entity/channel/FollowedChannel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.javacord.api.entity.channel; | ||
|
||
public interface FollowedChannel { | ||
/** | ||
* Gets the channel id of the channel. | ||
* | ||
* @return The channel id of the channel. | ||
*/ | ||
long getChannelId(); | ||
|
||
/** | ||
* Gets the channel id of the channel as string. | ||
* | ||
* @return The channel id of the channel as string. | ||
*/ | ||
default String getChannelIdAsString() { | ||
try { | ||
return Long.toUnsignedString(getChannelId()); | ||
} catch (NumberFormatException e) { | ||
throw new IllegalArgumentException("The given channel id is not a valid long value!", e); | ||
} | ||
} | ||
|
||
/** | ||
* Gets the targeted webhook id of the channel. | ||
* | ||
* @return The targeted webhook id of the channel. | ||
*/ | ||
long getTargetedWebhookId(); | ||
|
||
/** | ||
* Gets the targeted webhook id of the channel as string. | ||
* | ||
* @return The targeted webhook id of the channel as string. | ||
*/ | ||
default String getTargetedWebhookIdAsString() { | ||
try { | ||
return Long.toUnsignedString(getTargetedWebhookId()); | ||
} catch (NumberFormatException e) { | ||
throw new IllegalArgumentException("The given channel id is not a valid long value!", e); | ||
} | ||
} | ||
} |
Oops, something went wrong.