public class Invite extends Object implements DiscordObject
Constructor and Description |
---|
Invite(ServiceMediator serviceMediator,
InviteBean data)
Constructs a
Invite with an associated ServiceMediator and Discord data. |
Modifier and Type | Method and Description |
---|---|
Mono<Void> |
delete()
Requests to delete this invite.
|
Mono<Void> |
delete(String reason)
Requests to delete this invite while optionally specifying a reason.
|
Mono<TextChannel> |
getChannel()
Requests to retrieve the channel this invite is associated to.
|
Snowflake |
getChannelId()
Gets the ID of the channel this invite is associated to.
|
DiscordClient |
getClient()
Gets the DiscordClient associated to this object.
|
String |
getCode()
Gets the invite code (unique ID).
|
Mono<Guild> |
getGuild()
Requests to retrieve the guild this invite is associated to.
|
Snowflake |
getGuildId()
Gets the ID of the guild this invite is associated to.
|
String |
toString() |
public Invite(ServiceMediator serviceMediator, InviteBean data)
Invite
with an associated ServiceMediator and Discord data.serviceMediator
- The ServiceMediator associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.public final DiscordClient getClient()
DiscordObject
getClient
in interface DiscordObject
public final String getCode()
public final Snowflake getGuildId()
public final Mono<Guild> getGuild()
public final Snowflake getChannelId()
public final Mono<TextChannel> getChannel()
public final Mono<Void> delete()
Mono
where, upon successful completion, emits nothing; indicating the invite has been deleted.
If an error is received, it is emitted through the Mono
.public final Mono<Void> delete(@Nullable String reason)
reason
- The reason, if present.Mono
where, upon successful completion, emits nothing; indicating the invite has been deleted.
If an error is received, it is emitted through the Mono
.