Package de.presti.ree6.logger.events
Class LogMessage
java.lang.Object
de.presti.ree6.logger.events.LogMessage
- Direct Known Subclasses:
LogMessageMember,LogMessageRole,LogMessageUser,LogMessageVoice
Base-class for all Log-Messages.
-
Constructor Summary
ConstructorsConstructorDescriptionLogMessage(long webhookId, String webhookAuthCode, club.minnced.discord.webhook.send.WebhookMessage webhookMessage, net.dv8tion.jda.api.entities.Guild guild, LogTyp logTyp) Constructor for a Log-Message which shouldn't be handled. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel the current Log-Message.The Auth-Code used to authenticate the Webhook Packet.net.dv8tion.jda.api.entities.GuildgetGuild()Get the Guild of the Log-Message.longgetId()Webhook ID used for Discord to identify which Webhook is meant.getType()The current LogTyp.club.minnced.discord.webhook.send.WebhookMessageGet the current WebhookMessage.booleanCheck if the Message is canceled or not.voidsetCanceled(boolean cancel) Cancel the LogMessage or "uncancel" the LogMessage.voidChange the LogTyp of the current Message.voidsetWebhookMessage(club.minnced.discord.webhook.send.WebhookMessage webhookMessage) Change the current Webhook-Message.
-
Constructor Details
-
LogMessage
public LogMessage(long webhookId, String webhookAuthCode, club.minnced.discord.webhook.send.WebhookMessage webhookMessage, net.dv8tion.jda.api.entities.Guild guild, LogTyp logTyp) Constructor for a Log-Message which shouldn't be handled.- Parameters:
webhookId- The ID of the Webhook.webhookAuthCode- The Auth-Token for the Webhook.webhookMessage- WebhookMessage itself.guild- The Guild related to the Log-MessagelogTyp- The Typ of the current Log.
-
-
Method Details
-
getGuild
public net.dv8tion.jda.api.entities.Guild getGuild()Get the Guild of the Log-Message.- Returns:
- the Guild.
-
getId
public long getId()Webhook ID used for Discord to identify which Webhook is meant.- Returns:
- the Webhook ID.
-
getAuthCode
The Auth-Code used to authenticate the Webhook Packet.- Returns:
- the Authentication Code.
-
getWebhookMessage
public club.minnced.discord.webhook.send.WebhookMessage getWebhookMessage()Get the current WebhookMessage.- Returns:
- WebhookMessage.
-
setWebhookMessage
public void setWebhookMessage(club.minnced.discord.webhook.send.WebhookMessage webhookMessage) Change the current Webhook-Message.- Parameters:
webhookMessage- new Webhook-Message.
-
getType
The current LogTyp.- Returns:
- the LogTyp.
-
setType
Change the LogTyp of the current Message.- Parameters:
type- the new LogTyp.
-
cancel
public void cancel()Cancel the current Log-Message. -
isCanceled
public boolean isCanceled()Check if the Message is canceled or not.- Returns:
- is the Message canceled.
-
setCanceled
public void setCanceled(boolean cancel) Cancel the LogMessage or "uncancel" the LogMessage.- Parameters:
cancel- should the Message be canceled.
-