<commit_before>package exh3y.telebot.data;

import org.json.JSONObject;

import exh3y.telebot.data.enums.ETelegramChatType;

public class TelegramChat extends JSONObject {

	private ETelegramChatType type;
	
	/**
	 * Creates a new TelegramChat object from a given JSON-String
	 * 
	 * @param chat
	 * @since 0.0.6
	 */
	public TelegramChat(JSONObject chat) {

		super(chat.toString());
		
		this.type = ETelegramChatType.getEnumByName(chat.getString("type"));
	}
	
	/**
	 * Returns the chat's type
	 * 
	 * @return The chat's type
	 * @since 0.0.6
	 */
	public ETelegramChatType getType() {
		
		return type;
	}
	
	/**
	 * Returns the chat's id
	 * 
	 * @return The chat's id
	 * @since 0.0.6
	 */
	public int getId() {
		
		return this.getInt("id");
	}
	
	/**
	 * Returns the chat's title
	 * 
	 * @return The title
	 * @since 0.0.6
	 */
	public String getTitle() {
		
		return this.getString("title");
	}
	
}<commit_msg>Include all getter methods in TelegramChat<commit_after>package exh3y.telebot.data;

import org.json.JSONException;
import org.json.JSONObject;

import exh3y.telebot.data.enums.ETelegramChatType;

public class TelegramChat extends JSONObject {

	private ETelegramChatType type;

	/**
	 * Creates a new TelegramChat object from a given JSON-String
	 * 
	 * @param chat
	 * @since 0.0.6
	 */
	public TelegramChat(JSONObject chat) {

		super(chat.toString());

		this.type = ETelegramChatType.getEnumByName(chat.getString("type"));
	}

	/**
	 * Returns the chat's type
	 * 
	 * @return The chat's type
	 * @since 0.0.6
	 */
	public ETelegramChatType getType() {

		return type;
	}

	/**
	 * Returns the chat's id
	 * 
	 * @return The chat's id
	 * @since 0.0.6
	 */
	public int getId() {

		return this.getInt("id");
	}

	/**
	 * Returns the chat's title
	 * 
	 * @return The title
	 * @since 0.0.6
	 */
	public String getTitle() {

		try {

			return this.getString("title");
		} catch (JSONException e) {
			return "";
		}
	}

	/**
	 * Returns the user's username
	 * 
	 * @return The user's username
	 * @since 0.0.6
	 */
	public String getUsername() {

		try {

			return this.getString("username");
		} catch (JSONException e) {
			return "";
		}
	}

	/**
	 * Returns the user's first name
	 * 
	 * @return The user's first name
	 * @since 0.0.6
	 */
	public String getFirstName() {

		try {

			return this.getString("first_name");
		} catch (JSONException e) {
			return "";
		}
	}

	/**
	 * Returns the user's last name
	 * 
	 * @return The user's last name
	 * @since 0.0.6
	 */
	public String getLastName() {

		try {

			return this.getString("last_name");
		} catch (JSONException e) {
			return "";
		}
	}

	/**
	 * Are all users administrators?
	 * 
	 * @return True if all users are administrators, false otherwise
	 * @since 0.0.6
	 */
	public boolean getAllUsersAreAdmins() {

		try {

			return this.getBoolean("all_members_are_administrators");
		} catch (JSONException e) {
			return false;
		}
	}

}
{'fraction_non_alphanumeric': 0.13201769309288874, 'fraction_numerical': 0.013610071452875128, 'mean_word_length': 2.833116036505867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3626073', 'n_tokens_mistral': 1158, 'n_tokens_neox': 968, 'n_words': 256}