-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bbcf58
commit 06923be
Showing
9 changed files
with
229 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/de/Linus122/TelegramChat/TelegramActionListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package de.Linus122.TelegramChat; | ||
|
||
import de.Linus122.TelegramComponents.Chat; | ||
import de.Linus122.TelegramComponents.ChatMessageToTelegram; | ||
import de.Linus122.TelegramComponents.ChatMessageToMc; | ||
|
||
public interface TelegramActionListener { | ||
public void onSendToTelegram(Chat chat); | ||
public void onSendToTelegram(ChatMessageToTelegram chat); | ||
|
||
public void onSendToMinecraft(ChatMessageToMc chatMsg); | ||
} |
39 changes: 32 additions & 7 deletions
39
src/main/java/de/Linus122/TelegramComponents/Chat.java
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
package de.Linus122.TelegramComponents; | ||
|
||
public class Chat { | ||
public String text; | ||
public int chat_id; | ||
public String parse_mode; | ||
} | ||
package de.Linus122.TelegramComponents; | ||
|
||
public class Chat { | ||
private int id; | ||
private String type; | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
|
||
public void setId(int id) { | ||
this.id = id; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
/** | ||
* isPrivate | ||
* @return true for private, false for group chats | ||
*/ | ||
public boolean isPrivate(){ | ||
return type.equals("private"); | ||
} | ||
|
||
|
||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/de/Linus122/TelegramComponents/ChatMessageToTelegram.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package de.Linus122.TelegramComponents; | ||
|
||
public class ChatMessageToTelegram { | ||
public String text; | ||
public int chat_id; | ||
public String parse_mode; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package de.Linus122.TelegramComponents; | ||
|
||
public class Message { | ||
private int message_id; | ||
private User from; | ||
private int date; | ||
private Chat chat; | ||
private String text; | ||
|
||
public int getMessage_id() { | ||
return message_id; | ||
} | ||
|
||
public void setMessage_id(int message_id) { | ||
this.message_id = message_id; | ||
} | ||
|
||
public User getFrom() { | ||
return from; | ||
} | ||
|
||
public void setFrom(User from) { | ||
this.from = from; | ||
} | ||
|
||
public int getDate() { | ||
return date; | ||
} | ||
|
||
public void setDate(int date) { | ||
this.date = date; | ||
} | ||
|
||
public Chat getChat() { | ||
return chat; | ||
} | ||
|
||
public void setChat(Chat chat) { | ||
this.chat = chat; | ||
} | ||
|
||
public String getText() { | ||
return text; | ||
} | ||
|
||
public void setText(String text) { | ||
this.text = text; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package de.Linus122.TelegramComponents; | ||
|
||
public class Update { | ||
private int update_id; | ||
private Message message; | ||
private Message edited_message; | ||
private Message channel_post; | ||
private Message edited_channel_post; | ||
|
||
public int getUpdate_id() { | ||
return update_id; | ||
} | ||
|
||
public void setUpdate_id(int update_id) { | ||
this.update_id = update_id; | ||
} | ||
|
||
public Message getMessage() { | ||
return message; | ||
} | ||
|
||
public void setMessage(Message message) { | ||
this.message = message; | ||
} | ||
|
||
public Message getEdited_message() { | ||
return edited_message; | ||
} | ||
|
||
public void setEdited_message(Message edited_message) { | ||
this.edited_message = edited_message; | ||
} | ||
|
||
public Message getChannel_post() { | ||
return channel_post; | ||
} | ||
|
||
public void setChannel_post(Message channel_post) { | ||
this.channel_post = channel_post; | ||
} | ||
|
||
public Message getEdited_channel_post() { | ||
return edited_channel_post; | ||
} | ||
|
||
public void setEdited_channel_post(Message edited_channel_post) { | ||
this.edited_channel_post = edited_channel_post; | ||
} | ||
|
||
} |
Oops, something went wrong.