Reconfigured the jar artifact building.

This commit is contained in:
vylion 2016-10-09 02:26:42 +02:00
parent 9d2baf8531
commit 639b7975c8
2 changed files with 26 additions and 3 deletions

View file

@ -1,7 +1,7 @@
<component name="ArtifactManager">
<artifact type="jar" name="vylionbot:jar">
<output-path>$PROJECT_DIR$/out/artifacts/vylionbot_jar</output-path>
<root id="archive" name="vylionbot.jar">
<artifact type="jar" name="geiserpbot:jar">
<output-path>$PROJECT_DIR$/out/artifacts/geiserpbot_jar</output-path>
<root id="archive" name="geiserbot.jar">
<element id="module-output" name="geiserpbot" />
<element id="extracted-dir" path="$PROJECT_DIR$/libraries/unirest-java-1.4.10-SNAPSHOT-jar-with-dependencies.jar" path-in-jar="/" />
</root>

View file

@ -11,6 +11,29 @@ public class PrivateMessage extends Message {
public PrivateMessage(JSONObject message) {
super(message);
fullName = message.getJSONObject("from").getString("first_name");
uid = message.getJSONObject("from").getInt("id");
//Check for user last name
if (message.getJSONObject("from").has("last_name"))
fullName += " " + message.getJSONObject("from").getString("last_name");
//Check for user username
if (message.getJSONObject("from").has("username"))
userName = message.getJSONObject("from").getString("username");
else userName = null;
//Get group chat name
if (message.getJSONObject("chat").has("title"))
chatName = message.getJSONObject("chat").getString("title");
else chatName = null;
if (message.has("text"))
text = message.getString("text");
else text = null;
consoleLog = message.toString();
}
@Override