<commit_before>package milk.telegram.method.sender;

import milk.telegram.bot.TelegramBot;
import milk.telegram.method.SendInstance;
import milk.telegram.type.Identifier;
import milk.telegram.type.Usernamed;
import milk.telegram.type.chat.Channel;
import milk.telegram.type.message.Message;
import milk.telegram.type.reply.ReplyMarkup;
import milk.telegram.type.user.User;
import org.json.JSONObject;

public abstract class Sender extends SendInstance{

    public Sender(TelegramBot bot){
        super(bot);
    }

    public String getChatId(){
        return this.optString("chat_id");
    }

    public long getMessageId(){
        return this.optLong("message_id");
    }

    public JSONObject getReplyMarkup(){
        return this.optJSONObject("reply_markup");
    }

    public boolean isDisableNotification(){
        return this.optBoolean("disable_notification");
    }

    public Sender setUserId(Object user_id){
        if(user_id instanceof User){
            this.put("user_id", ((User) user_id).getId());
        }else if(user_id instanceof Number){
            this.put("user_id", ((Number) user_id).intValue());
        }
        return this;
    }

    public Sender setChatId(Object chat_id){
        if(chat_id instanceof Identifier){
            chat_id = chat_id instanceof Channel ? "@" + ((Usernamed) chat_id).getUsername() : ((Identifier) chat_id).getId();
        }

        if(chat_id instanceof String){
            this.put("chat_id", chat_id);
        }else if(chat_id instanceof Number){
            this.put("chat_id", ((Number) chat_id).longValue() + "");
        }
        return this;
    }

    public Sender setMessageId(Object message_id){
        if(message_id instanceof Message){
            this.put("message_id", ((Message) message_id).getId());
            this.put("chat_id", ((Message) message_id).getChat().getId() + "");
        }else if(message_id instanceof Number){
            this.put("message_id", ((Number) message_id).longValue());
        }
        return this;
    }

    public Sender setReplyMarkup(ReplyMarkup reply_markup){
        this.put("reply_markup", reply_markup);
        return this;
    }

    public Sender setDisableNotification(boolean value){
        this.put("disable_notification", value);
        return this;
    }

}<commit_msg>이상한 짓 하네...<commit_after>package milk.telegram.method.sender;

import milk.telegram.bot.TelegramBot;
import milk.telegram.method.SendInstance;
import milk.telegram.type.Identifier;
import milk.telegram.type.Usernamed;
import milk.telegram.type.chat.Channel;
import milk.telegram.type.message.Message;
import milk.telegram.type.reply.ReplyMarkup;
import milk.telegram.type.user.User;
import org.json.JSONObject;

public abstract class Sender extends SendInstance{

    public Sender(TelegramBot bot){
        super(bot);
    }

    public String getChatId(){
        return this.optString("chat_id");
    }

    public long getMessageId(){
        return this.optLong("message_id");
    }

    public JSONObject getReplyMarkup(){
        return this.optJSONObject("reply_markup");
    }

    public boolean isDisableNotification(){
        return this.optBoolean("disable_notification");
    }

    public Sender setUserId(Object user_id){
        if(user_id instanceof User){
            this.put("user_id", ((User) user_id).getId());
        }else if(user_id instanceof Number){
            this.put("user_id", ((Number) user_id).intValue());
        }
        return this;
    }

    public Sender setChatId(Object chat_id){
        if(chat_id instanceof Identifier){
            chat_id = chat_id instanceof Channel ? "@" + ((Usernamed) chat_id).getUsername() : ((Identifier) chat_id).getId();
        }

        if(chat_id instanceof String){
            this.put("chat_id", chat_id);
        }else if(chat_id instanceof Number){
            this.put("chat_id", ((Number) chat_id).longValue() + "");
        }
        return this;
    }

    public Sender setMessageId(Object message_id){
        if(message_id instanceof Message){
            this.put("reply_to_message_id", ((Message) message_id).getId());
            this.put("chat_id", ((Message) message_id).getChat().getId() + "");
        }else if(message_id instanceof Number){
            this.put("reply_to_message_id", ((Number) message_id).longValue());
        }
        return this;
    }

    public Sender setReplyMarkup(ReplyMarkup reply_markup){
        this.put("reply_markup", reply_markup);
        return this;
    }

    public Sender setDisableNotification(boolean value){
        this.put("disable_notification", value);
        return this;
    }

}
{'fraction_non_alphanumeric': 0.12295434969853575, 'fraction_numerical': 0.0, 'mean_word_length': 2.9297800338409474, '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': '6334966', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1362, 'n_words': 274}