pro.zackpollard.telegrambot.api.event.chat.ParticipantJoinGroupChatEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jtelegram-botapi Show documentation
Show all versions of jtelegram-botapi Show documentation
The Java Telegram Bot API is a wrapper for the Telegram HTTP Bot API
package pro.zackpollard.telegrambot.api.event.chat;
import pro.zackpollard.telegrambot.api.chat.Chat;
import pro.zackpollard.telegrambot.api.chat.message.Message;
import pro.zackpollard.telegrambot.api.chat.message.content.NewChatParticipantContent;
import pro.zackpollard.telegrambot.api.event.chat.message.MessageEvent;
import pro.zackpollard.telegrambot.api.user.User;
/**
* @author Zack Pollard
*/
public class ParticipantJoinGroupChatEvent extends MessageEvent {
public ParticipantJoinGroupChatEvent(Message message) {
super(message);
}
public User getParticipant() {
return ((NewChatParticipantContent) getMessage().getContent()).getContent();
}
public Chat getChat() {
return getMessage().getChat();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy