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

Add new message types #2371

Merged
merged 7 commits into from
Feb 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/main/java/net/dv8tion/jda/api/entities/MessageType.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package net.dv8tion.jda.api.entities;

import net.dv8tion.jda.api.entities.channel.concrete.StageChannel;

import javax.annotation.Nonnull;

/**
Expand Down Expand Up @@ -158,6 +160,41 @@ public enum MessageType
*/
ROLE_SUBSCRIPTION_PURCHASE(25, true, true),

/**
* Sent by a bot when a command is restricted to premium users.
* <br>Contains a button which allows to upgrade to premium.
*/
INTERACTION_PREMIUM_UPSELL(26, true, true),

/**
* Messages created in {@link StageChannel StageChannels} to indicate that a stage instance has started.
* <br>The message content will be the {@link StageInstance#getTopic() topic} and the author is the user who started the stage instance.
*/
STAGE_START(27, true, true),

/**
* Messages created in {@link StageChannel StageChannels} to indicate that a stage instance has ended.
* <br>The message content will be the {@link StageInstance#getTopic() topic} and the author is the user who ended the stage instance.
*/
STAGE_END(28, true, true),

/**
* Messages created in {@link StageChannel StageChannels} to indicate that a new {@link StageInstance#getSpeakers() speaker} is up.
* <br>The author is the user who became speaker.
*/
STAGE_SPEAKER(29, true, true),

/**
* Messages created in {@link StageChannel StageChannels} to indicate that a stage instance topic has been changed.
* <br>The message content will be the new {@link StageInstance#getTopic() topic} and the author is the user who updated the topic.
*/
STAGE_TOPIC(31, true, true),

/**
* Sent to the {@link Guild#getSystemChannel() system channel} when a guild administrator subscribes to the premium plan of an application.
*/
GUILD_APPLICATION_PREMIUM_SUBSCRIPTION(32, true, true),

/**
* Unknown MessageType.
*/
Expand Down Expand Up @@ -213,6 +250,7 @@ public boolean isSystem()
* <li>{@link #GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING}</li>
* <li>{@link #GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING}</li>
* <li>{@link #THREAD_STARTER_MESSAGE}</li>
* <li>{@link #GUILD_APPLICATION_PREMIUM_SUBSCRIPTION}</li>
* </ul>
*
* @return True, if delete is supported
Expand Down