Class GuildMemberUpdateBannerEvent
- All Implemented Interfaces:
GenericEvent, UpdateEvent<Member,String>
Member updated their Guild banner.
Can be used to retrieve members who change their per guild banner, the triggering guild, the old banner id and the new banner id.
Identifier: banner
Requirements
This event requires the GUILD_MEMBERS intent to be enabled.
createDefault(String) and
createLight(String) disable this by default!
Additionally, this event requires the MemberCachePolicy
to cache the updated members. Discord does not specifically tell us about the updates, but merely tells us the
member was updated and gives us the updated member object. In order to fire a specific event like this we
need to have the old member cached to compare against.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGuildMemberUpdateBannerEvent(JDA api, long responseNumber, Member member, String oldBannerId) -
Method Summary
Modifier and TypeMethodDescriptionReturns anImageProxyfor this member's new banner.getNewBanner(ImageFormat format) Returns anImageProxyfor this member's new banner.The new banner idThe url of the new bannergetNewBannerUrl(ImageFormat format) The url of the new bannerReturns anImageProxyfor this member's old banner.getOldBanner(ImageFormat format) Returns anImageProxyfor this member's old banner.The old banner idThe previous banner urlgetOldBannerUrl(ImageFormat format) The previous banner urlMethods inherited from class GenericGuildMemberUpdateEvent
getEntity, getNewValue, getOldValue, getPropertyIdentifierMethods inherited from class GenericGuildMemberEvent
getMember, getUserMethods inherited from class GenericGuildEvent
getGuildMethods inherited from class Event
getJDA, getRawData, getResponseNumber, toStringMethods inherited from interface GenericEvent
getJDA, getRawData, getResponseNumberMethods inherited from interface UpdateEvent
getEntityType
-
Field Details
-
IDENTIFIER
- See Also:
-
-
Constructor Details
-
GuildMemberUpdateBannerEvent
-
-
Method Details
-
getOldBannerId
-
getOldBannerUrl
-
getOldBannerUrl
The previous banner url- Parameters:
format- The format in which the image should be- Returns:
- The previous banner url
- Throws:
IllegalArgumentException- If the format isnull- See Also:
-
getOldBanner
Returns anImageProxyfor this member's old banner.Note: the old banner may not always be downloadable as it might have been removed from Discord.
- Returns:
- Possibly-null
ImageProxyof this member's old banner - See Also:
-
getOldBanner
Returns anImageProxyfor this member's old banner.Note: the old banner may not always be downloadable as it might have been removed from Discord.
- Parameters:
format- The format in which the image should be- Returns:
- Possibly-null
ImageProxyof this member's old banner - Throws:
IllegalArgumentException- If the format isnull- See Also:
-
getNewBannerId
-
getNewBannerUrl
The url of the new banner- Returns:
- The url of the new banner
-
getNewBannerUrl
The url of the new banner- Parameters:
format- The format in which the image should be- Returns:
- The url of the new banner
- Throws:
IllegalArgumentException- If the format isnull- See Also:
-
getNewBanner
Returns anImageProxyfor this member's new banner.- Returns:
- Possibly-null
ImageProxyof this member's new banner - See Also:
-
getNewBanner
Returns anImageProxyfor this member's new banner.- Parameters:
format- The format in which the image should be- Returns:
- Possibly-null
ImageProxyof this member's new banner - Throws:
IllegalArgumentException- If the format isnull- See Also:
-