public final class Ban extends Object implements DiscordObject
Constructor and Description |
---|
Ban(ServiceMediator serviceMediator,
BanBean data)
Constructs a
Ban with an associated ServiceMediator and Discord data. |
Modifier and Type | Method and Description |
---|---|
DiscordClient |
getClient()
Gets the DiscordClient associated to this object.
|
Optional<String> |
getReason()
Gets the reason for the ban.
|
User |
getUser()
Gets the banned user.
|
String |
toString() |
public Ban(ServiceMediator serviceMediator, BanBean data)
Ban
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 DiscordClient getClient()
DiscordObject
getClient
in interface DiscordObject
public Optional<String> getReason()
public User getUser()