Sunday, September 24, 2023

How To Make A telegram Blot using SpringBoot (java)

 To Make a Telegram Bot ,first you have to create a bot in telegram,type BotFather in telegram search 

type /newbot in the telegram (like there in pic)

Here, I gave bot name as (satishbot),has shown in the pic.



we will get the token,like there in above pic ,In the above pic you can see(Use this token HTTP API),there at the botton ,you will see the token.This is all you have to do with telegram App

With the use of Spring Iniatializer create a SpringBoot project


  

The above pic is the package structure of a chatbot application using Eclipse IDE.


The above pic shows classes in the package.I will give the code below of each class in the package

ChatbotApplication main class

Here we have  to register out bot class with telegram

package com.example.chatbot.chatbot;


import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.telegram.telegrambots.meta.TelegramBotsApi;

import org.telegram.telegrambots.meta.exceptions.TelegramApiException;

import org.telegram.telegrambots.meta.generics.BotSession;

import org.telegram.telegrambots.meta.generics.LongPollingBot;

import org.telegram.telegrambots.meta.generics.TelegramBot;

//import org.telegram.telegrambots.meta.TelegramBotsApi;

//import org.telegram.telegrambots.meta.TelegramBotsApi;

/*import org.telegram.telegrambots.meta.exceptions.TelegramApiException;

import org.telegram.telegrambots.meta.generics.BotSession;

import org.telegram.telegrambots.meta.generics.LongPollingBot;

import org.telegram.telegrambots.updatesreceivers.DefaultBotSession;*/

import org.telegram.telegrambots.updatesreceivers.DefaultBotSession;


import com.example.chatbot.config.TelegramBotConfig;


//import com.pengrad.telegrambot.TelegramBot;


@SpringBootApplication(scanBasePackages={ "com.example.chatbot.config"})

public class ChatbotApplication {


public static void main(String[] args) {

SpringApplication.run(ChatbotApplication.class, args);

///TelegramBot telegramBot = new TelegramBot();

//TelegramBot telegramBot = new TelegramBot();

    try {

        TelegramBotsApi botsApi = new TelegramBotsApi(DefaultBotSession.class);

        botsApi.registerBot(new TelegramBotConfig());

        System.out.println("bot registered successfully");

    } catch (TelegramApiException e) {

        e.printStackTrace();

    }

}


}

TelegramBotConfig :: class code 

package com.example.chatbot.config;

import com.example.chatbot.UserState.UserStateEnum;

import com.pengrad.telegrambot.TelegramBot;

//import com.pengrad.telegrambot.request.SendMessage;


import java.util.HashMap;

import java.util.Map;


//import com.pengrad.telegrambot.TelegramBotAdapter;

import org.springframework.beans.factory.annotation.Value;

import org.springframework.context.annotation.Bean;

import org.springframework.context.annotation.Configuration;

import org.springframework.stereotype.Component;

import org.telegram.telegrambots.bots.DefaultAbsSender;

import org.telegram.telegrambots.bots.TelegramLongPollingBot;

import org.telegram.telegrambots.meta.api.methods.send.SendMessage;

import org.telegram.telegrambots.meta.api.objects.Message;

import org.telegram.telegrambots.meta.api.objects.Update;

import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboard;

import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboardRemove;

import org.telegram.telegrambots.meta.bots.AbsSender;

import org.telegram.telegrambots.meta.exceptions.TelegramApiException;

import static  com.example.chatbot.UserState.UserStateEnum.AWAITING_NAME;

import com.example.chatbot.KeyBoardFac.*;

import static com.example.chatbot.UserState.UserStateEnum.FOOD_DRINK_SELECTION;

import static com.example.chatbot.UserState.UserStateEnum.AWAITING_CONFIRMATION;

import static com.example.chatbot.UserState.UserStateEnum.PIZZA_TOPPINGS;


@Component

public class TelegramBotConfig extends TelegramLongPollingBot  {

private final HashMap<Long, UserStateEnum> chatStates =new HashMap<>();

 

@Override

public void onUpdateReceived(Update update) {

String userMessage=update.getMessage().getText();

Long chatId=update.getMessage().getChatId();

SendMessage message = new SendMessage();

   if(userMessage.equalsIgnoreCase("/start")) {

   replyToStart(chatId);

   

  }

  

   if(!userMessage.equalsIgnoreCase("/start")) {

  switch (chatStates.get(chatId)) { case AWAITING_NAME ->

  replyToName(chatId, update); case FOOD_DRINK_SELECTION ->

replyToFoodDrinkSelection(chatId, update);

case PIZZA_TOPPINGS -> 

  replyToPizzaToppings(chatId, update); case AWAITING_CONFIRMATION ->

  replyToOrder(chatId, update); default -> unexpectedMessage(chatId); }

   }

   }

   

@Override

public String getBotUsername() {

return "satred35bot";

}



  @Override public String getBotToken() { return "6467366090:AAE-1eCSTPVhbeu0O0VlqYjODeaOu8_jHWE"; }

 


public void replyToStart(Long chatId) {

try {

SendMessage message=    new SendMessage();

message.setChatId(chatId.toString());

message.setText("Welcome to satishbot ,please enter your name");

execute(message);

chatStates.put(chatId,AWAITING_NAME ); 

}catch (TelegramApiException e) {

        e.printStackTrace();

    }

    

}

private void unexpectedMessage(Long chatId) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    sendMessage.setText("I did not expect that.");

    try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

private void replyToName(Long chatId, Update message) {

    promptWithKeyboardForState(chatId, "Hello " + message.getMessage().getText() + ". What would you like to have?",

      KeyboardFactory.getPizzaOrDrinkKeyboard(),

     FOOD_DRINK_SELECTION);

}

private void promptWithKeyboardForState(Long chatId, String text, ReplyKeyboard YesOrNo, UserStateEnum awaitingReorder) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    sendMessage.setText(text);

    sendMessage.setReplyMarkup(YesOrNo);

   try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}


  chatStates.put(chatId, awaitingReorder);

 }

private void replyToPizzaToppings(Long chatId, Update message) {

    if ("margherita".equalsIgnoreCase(message.getMessage().getText())) {

        promptWithKeyboardForState(chatId, "You selected Margherita Pizza.\nWe will deliver it soon. Thank you!\nOrder again?",

                KeyboardFactory.getYesOrNo(), AWAITING_CONFIRMATION);

    } else if ("pepperoni".equalsIgnoreCase(message.getMessage().getText())) {

        promptWithKeyboardForState(chatId, "We finished the Pepperoni Pizza.\nSelect another Topping",

                KeyboardFactory.getPizzaToppingsKeyboard(), PIZZA_TOPPINGS);

    } else {

        SendMessage sendMessage = new SendMessage();

        sendMessage.setChatId(chatId.toString());

        sendMessage.setText("We don't sell " + message.getMessage().getText() + " Pizza.\nSelect the toppings!");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaToppingsKeyboard());

        try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

    }

}

private void replyToFoodDrinkSelection(Long chatId, Update message) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    if ("drink".equalsIgnoreCase(message.getMessage().getText())) {

        sendMessage.setText("We don't sell drinks.\nBring your own drink!! :)");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaOrDrinkKeyboard());

       try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

    } else if ("pizza".equalsIgnoreCase(message.getMessage().getText())) {

        sendMessage.setText("We love Pizza in here.\nSelect the toppings!");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaToppingsKeyboard());

        try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

chatStates.put(chatId, PIZZA_TOPPINGS); 

    } else {

        sendMessage.setText("We don't sell " + message.getMessage().getText() + ". Please select from the options below.");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaOrDrinkKeyboard());

       try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

    }

}

private void replyToOrder(Long chatId, Update message) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    if ("yes".equalsIgnoreCase(message.getMessage().getText())) {

        sendMessage.setText("We will deliver it soon. Thank you!\nOrder another?");

        sendMessage.setReplyMarkup(KeyboardFactory.getPizzaOrDrinkKeyboard());

       try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

chatStates.put(chatId, FOOD_DRINK_SELECTION); 

    } else if ("no".equalsIgnoreCase(message.getMessage().getText())) {

        stopChat(chatId);

    } else {

        sendMessage.setText("Please select yes or no");

        sendMessage.setReplyMarkup(KeyboardFactory.getYesOrNo());

       try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

    }

}

private void stopChat(Long chatId) {

    SendMessage sendMessage = new SendMessage();

    sendMessage.setChatId(chatId.toString());

    sendMessage.setText("Thank you for your order. See you soon!\nPress /start to order again");

chatStates.remove(chatId); 

    sendMessage.setReplyMarkup(new ReplyKeyboardRemove(true));

   try {

execute(sendMessage);

} catch (TelegramApiException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}



}


class KeyboardFactory code::::


package com.example.chatbot.KeyBoardFac;


import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboard;

import org.telegram.telegrambots.meta.api.objects.replykeyboard.ReplyKeyboardMarkup;

import org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.KeyboardRow;


import java.util.List;


public class KeyboardFactory {

public static ReplyKeyboard getPizzaToppingsKeyboard() {

KeyboardRow row = new KeyboardRow();

row.add("Margherita");

row.add("Pepperoni");

return new ReplyKeyboardMarkup(List.of(row));

}


public static ReplyKeyboard getPizzaOrDrinkKeyboard(){

KeyboardRow row = new KeyboardRow();

row.add("Pizza");

row.add("Drink");

return new ReplyKeyboardMarkup(List.of(row));

}


public static ReplyKeyboard getYesOrNo() {

KeyboardRow row = new KeyboardRow();

row.add("Yes");

row.add("No");

return new ReplyKeyboardMarkup(List.of(row));

}

}




Enum UserStateEnum





package com.example.chatbot.UserState;


public enum UserStateEnum {

AWAITING_NAME, FOOD_DRINK_SELECTION, PIZZA_TOPPINGS, AWAITING_CONFIRMATION

}





OUTPUT WILL BE LIKE 






Friday, June 16, 2023

Paparazzi pilaster

 lease Rate This Story


In a bustling suburb of Mumbai, a school named Mumbai public school, on the eve of Independence Day is sprouting with activity. School with its legendary past, known to invite a famous personality of the year, for its independence day. The climate serenity, with the gigantic crowd collocated, echoed an aura of happiness. With the Indian flag entwined

On the podium, looking to be unfurled by the chief guest, all sight rested on the chief guest of the day,
The crowd is in a cryptic dilemma, with high dignitaries of the school refusing to reveal the name of the guest,
Every face in the crowd was mazed by the question, who will be the chief guest for this year? Into the
Grim silence, a BMW choke its tethering flow, and a man with a pale emblemed face, thin in appearance entered from the BMW, with he left the residing, crowd at the end of the cusp, seeing the principal rushing towards the entry of auditorium, to invite the guest of the day. With an affable smile, the principal of the school invited the guest into the auditorium. With Forlorn walking in front of the audience, the crowd got a glimpse of the guest, murmur broke into the crowd, with some part of the audience recognizing the famous figure. The principal and the guest, stepping ahead on the podium of the auditorium, found their chair to be seated. With the guest settled and having a glimpse of the curious crowd, the crowd enjoyed the full view of the guest. The senior teacher of the school nears the Mike on podium, to start the proceedings of the day. The senior teacher, called on the principal of the school, to introduce the chief guest. With a beaming flash the principal took Mike into his hand and started introducing the guest. The principle says: "Good morning to enthused gathering. I like to introduce to the audience our chief guest. He is Mr susheel, a paparazzi, with his mystic photos winning many awards, in and outside our country. Recently, he won a world-famous award in paparazzi. I like him to unfurl our tricolor ".Part of the crowd already knew the guest's name before the introduction, so were unmoved.
With that, the principal and Mr susheel took great steps toward the flag pole. Mr susheel, unfurled the tricolor, and petals of flowers graced the guest. A Crescendo of the Indian National anthem spread through the auditorium. The guest, principal, and crowd stand to the National anthem, with patriotic fervor running in the veins of people. The last lines of the anthem saw, the crowd in a serene pose. The anthem ended, principal moved towards Mike, to invite Mr susheel to engross his an inspiring journey to the crowd filled with students and their parents. Mr susheel moved towards Mike in brisk style, the crowd seeing Mr susheel, where into conundrum, how come Mr susheel made a living and went from rags to riches, while being a paparazzi?, the crowd was spellbound by the magnetic personality of Mr susheel. Mr susheel taking Mike into his hand started with a sober mood overtook the jubilant state, which he was previously in. Mr susheel started addressing the crowd, and became emotional, Mr susheel says, "Good morning parents and students, Success in any field depends on knowing the intricacies of the field as well as the luck involved. My journey is moved by two wheels of luck and hard work both balancing my paparazzi vehicle equally. Never in my budding days, dreamed about my success being so big. I want these tech-savvy, Hitech parents not to draw a boundary to their child's career plan. I saw in India, very few risks with new fields like paparazzi. In the U.S., European countries, take up different fields. My story is no less engrossing than a super-hit Bollywood movie, having all types of shades visible. (Mr susheel, took a pause, sipping water, from the glass on the table, with his stern glance towards the audience, saw the crowd mesmerized). Mastery of any field, depends on the intellectual depth you have in that field, I can take the example of the great Picasso, why is his art, so famous and costly? It is because of the Intellectual depth his art emulates. Similarly in any field may be it Engineering, paparazzi, maths, etc, talent in these fields depends on Intellectual depth. My story goes back to 30 years earlier Telangana, born in the slums of Adilabad. My parents both toddy toppers, have their profession. In the grim reality, my parents in one room stay, deprived of basic amenities. With the family income of 1000 rs per month, life was very tough and rough. Those were the day, our family struggled for every piece of bread. My success in paparazzi is because of my mind filled with terrifying scenes of childhood struggles, I had seen, and my surroundings filled with sorrow. Recently, I won a prize because my photo unfolded, the cryptic story of a hungry person, which I experienced. The success of today mostly depends on the tough ride, I go through in my childhood. Going to school was travel for 20 km, outside our slum, and my parents decided to enroll me in school, that was the crucial decision my parents took, which paid off, in my later quest for success. In early schooling, i was studious and always liked by my teacher. When I was in 2 class of schooling, an incident completely changed the course of my life. I was coming from school, and there I found a person, holding a camera in his hands, taking some, interesting photos of our slum, seeing him taking photos, I was curious, some questions encountered my thought, about why he was taking the photos of these grim realities? What he will get?, because of the curious mind, I have, the questions made me inquire, I started moving towards the photographer, and started asking my questions, I found him very friendly, he told, he was a paparazzi, representing a Hindu newspaper and told, that I am very small to know the meaning of the word. I asked him to give, me the camera for a moment, which he did, and my fascination for my weapon (camera) started. But I got to know, the thing he was doing, behind the grim reality of an empty stomach, there started my, adventure for photography. In the 5 class of schooling, I was collecting photos from the magazines I encountered. To my surprise, one day, I saw the same paparazzi, whom I met 3 years back. I met him, and with the first glace of his sight, he recognized me. I told, him to wait for me, went to the house, and got the collection of photos, I collected, he was my first guide, who took me into his stride, and was impressed by my interest in Paparazzi. His name was Mr. Shyam, he was a struggling paparazzi but a generous and kind-hearted person. He inquired about my family, (he told, he was impressed by my keen eye for photography and liked to help me, his salary is rs 10000 per month, he told, he will help me). He got the complete whereabouts of my place, left the place, promising me to help. He appeared in front of me, after 3 months gap, and to my surprise, he gifted me Kodak 240, an entry model, to me. I thanked the generosity shown by him towards me. He told me to click some photos of a variety of birds in and around the Adilabad slums. He left the place, never after that, incident, we ever met again. After two years, in the Hindu newspaper, I found the news of Mr. Shyam's obituary. On that day, I cried a lot, with my tears, telling Mr Shyam, to rest in peace. Mr Shyam concomitant, played a crucial part in the marvelous success, I am enjoying. Into the 8 class of schooling, being a backbencher, I studied the intricacies of Steven's photos, which are like a bible for paparazzi. With the camera( kodak 240, which was gifted by Mr Shyam), I had a complete collection of photos of birds, and slums captured every minute detail in my photos. My first success came when I was in 10 class of schooling, the picture I took of my slum, was figured out in Hindu and I was paid Rs 5000 for that, it was my first salary, my parents were happy about it, my friends in the slum, were in the jubilant state, with my photo appearing in Hindu, Hyderabad edition, started my professional career in paparazzi. From that day, my photos appeared in newspapers like the Hindu, and Indian Express regularly. I was earning respectable money at the age of 16, and my life which was on tenterhooks before transformed into reasonable living. With my reasonable salary, I was able to buy, my parent's dress, which braced my confidence, with their sanguine words. I prayed to Ganesha (god), known to be a words magician. I joined Vivekananda junior college, known to finance budding talent, and got a scholarship for my further endeavors. Soon after completing of my college, got a job in an elite American company, where the glitters of the Royal elite, made me part of the elite. With my skills sharpened, in the company of the elite, in the span of 12 years, went from rags to riches. Where I am now, is the story of the hard work and dedication I gave to my field. Thanking the gathering of parents, children, and respectable teachers, I like to end my speech. The whole crowd gave a standing ovation to Mr susheel, moved by the grand ovation, and tears roll out of Mr susheel eyes. The principal addressed the gathering, "Mr susheel is an inspiration to many, who want to reach the skies. Thank you Mr susheel".Mr susheel left the podium of the auditorium, Principle accompanied him and gave a send-off. Curtains to the inspiring life.

Saturday, May 6, 2023

crescendo of deaf

                                                  

 

I am perplexed whether being deaf is really an imprecation. Close enculturation into the premiate of deafness. I conclude it can be boom also. To exonerate the maze of the above thinking, I like to delve into Mother nature's deafness. Being deaf to human cruelty, nature's deaf crescendo inculcates love into humans. The deaf crescendo of nature tunes a string of notes, that fills love. Human's arrogance is tamed by sweet crescendo of nature.


Thursday, September 8, 2022

Alisha, its you and me




 Into the alluring evening, On the preface of finding love, my sight on a restless fringe, saw a dp that my senses placatingly agreed to find love in that angelical woman, toting from the dp her unlimited love. I fidgetily started pinging her, into the surprise of dawn, I find her reply full of agreement. With her charming reply, to my never-ending curiosity, with her patience completely made my desire unfurl. I started asking her name, with turquoise emblemed head, tutoring me to tone with no flam, my unconditional love. With her ever confidence reply, that made an angelical woman an Alisha. I started echoing "Alisha, it's you and me".

Wednesday, December 25, 2019

Incumbent CM Kejriwal's Agenda in Delhi Elections 2020


With PM Modi, drawing first blood, started his campaigning in Delhi Elections 2020 by speaking on CAA-NRC and attacking AAP from Delhi's Ramlila Maidan. The fight is on between incumbent CM Kejriwal and PM Narendra Modi for Delhi. It seems incumbent CM Kejriwal choosing not to touch contentious issues like CAA-NRC, Article 370, instead choose to be on the safe side. Many surveys showing incumbent CM Kejriwal to be popular in Delhi. The plan seems to tone down on contentious issues and instead concentrate on work done in Delhi. In his close to 27 minutes speech, incumbent CM Kejriwal put the ball rolling for party campaigning in Delhi Assembly Elections 2020.

            launching  AAP's Achievement report (CM Kejriwal speech highlights)


Incumbent CM Kejriwal giving more importance to the achievements launched 'AAP ka report Card'  on Tuesday(12/24/2019) which emphasized its top 10 achievements in its 5-year rule. He in his speech-giving importance to its achievements in Education, Health, Women empowerment. He highlighted the work done on the Education field, how his government transformed government-run state schools to compete with private schools and put the check on admission fees of private schools. Definitely, a lot of work is done by AAP on the Education front and it was truly reflected in its report.
On the health and Electricity front, he spoke about how the health sector was transformed and no Electricity cut in his 5 years term. He spoke on women's safety and empowerment, how installing  CCTV's, free public transports for women doing good to women safety.    
Honesty was highlighted, how his government was given clean chit from CAG, Delhi police, Income tax department, CBI. Honesty was always a forte for AAP, they stormed the political arena with the word 'Honesty'.
 AAP's plans about striking on tanker mafia, water issues were highlighted. Further,  door- to- door campaigning,mohalla sabha's,Kejriwal's seven town halls follow.

All in all, incumbent CM Kejriwal being a ground level leader, it will not be easy to uproot him in Delhi Assembly Elections 2020.

Tuesday, December 24, 2019

PM(Prime Minister)Modi's name is not enough to win assembly elections: untold reality


It is the truth that PM Narendra Modi's stature is gigantic in Indian history. Very few Indian prime ministers(only Ex-PM  Jawaharlal Nehru)  have won consecutive elections (2014,2019), with this type of thumping majority(282 seats in 2014,303 seats in 2019). There is no denying that he is the charm personified. He had gained a good reputation in international circles, he has put India on the world map. His commitment to BJP is unquestionable, election after elections his campaigning really helping BJP to perform well. But why BJP is losing state after state?. It has lost 5 states in a year. Its time BJP to really introspect deeply, How long will they bank only on Modi's name to garner votes?. There is no denying that state issues are different and central issues are different. In all these state elections which BJP has lost, state leaders are performing very badly. They have to know, a collective effort is needed to win elections. Let's see insights into the BJP ex-CM performance in a lost state. 

                     Jharkhand Assembly Elections 2019 (Ex-CM Raghubar Das)

He is known to be an arrogant, corrupt to the core leader. He is tarnishing Modi's image as a clean leader. In his tenure, he ruthlessly tried to suppress tribals, who have taught him a befitting lesson. He lost his own ( Jamshedpur (East)) seat to  BJP rebel Saryu Roy, who contested elections as an independent.BJP rebel Saryu Roy, known to be an honest person was not given the due importance.Ex-CM Raghubar Das untouched about the ground realities was taught a lesson.

Similarly, in states of Rajasthan, Haryana, Chhattisgarh, Madhya Pradesh arrogance of state leaders is taking a toll on BJP's performance. In Haryana, CM Dushyant Chautala is also known to be very arrogant. Madhya Pradesh rocked with corruption scandals like Vyapam saw the end of charismatic ex-CM Shivraj Singh Chouhan. The fact is that all these five states helped BJP to win Lok Sabha 2019 elections.

I conclude, For how long BJP's state leaders will bask under Modi's name to cover-up their arrogance, non-performance. They have to put there hand up for BJP to perform better in Assembly elections.BJP's , Jharkhand Elections 2019 loss is a strategic blunder.

Wednesday, December 18, 2019

Phase 5 Jharkhand elections 2019


The battle for Jharkhand elections 2019  drawn to its climax on December 20, results will be out on December 23. The final phase of elections is for 16 constituencies they are Rajmahal,Boiro (ST),Barhait (ST),Litipara (ST),Pakur,Maheshpur (ST),Sikaripara (ST),Dumka (ST),Jama (ST),Jarmundi,Nala,Jamtara,Deoghar Sarath,Poreyahat,Godda,Mahagama, who will vote in the last phase on December 20. The BJP, Congress, JMM has up their ante for the one last time. All the top leaders including PM Modi, Amit Shah, Rahul Gandhi, Priyanka Gandhi whirlwind visits to Jharkhand continue. In an election rally at Barhait in Sahebganj district in Jharkhand PM Modi seen clearing the false air about Citizenship Amendment Act and attacking the Congress and its allies JMM and RJD, Left. Congress General Secretary, Priyanka Gandhi  Vadra in an elections rally at Pakur hit back at BJP, she says on the passage of Citizenship Amendment Bill as "India's tryst with bigotry".With the allegations and counter-allegations, the battle pitch seeing a stellar contest.

                                                     About Santhal Pargana

Santhal Pargana consists of Sixteen of the 18 constituencies across six districts such as Deoghar, Godda, Sahebganj, Pakur, Dumka, and Jamtara.In Jharkhand Elections 2014, Santhal Pargana was mainly a battle between BJP and JMM. With the high intensity of the campaign going on in Jharkhand for Santhal Pargana, the importance of the area is known. With JMM intensifying its campaigning focusing on land acquisition, to break tribal vote since incumbent CM Ragubar Das became infamous among tribals for land acquisition(Tenancy laws).BJP  banking on Hindu vote Consolidation by pitching the importance of the Citizenship Amendment Act and NRC. Most of the constituencies in phase 5 share borders with West Bengal and have there share of immigrants, hence mostly Hindus of this area will welcome CAA(Citizenship Amendment Act).it is said that JMM's previous CM Shibu Soren has a good hold in this region. The one who consolidates the most of Hindu and tribal votes will win Santhal Pargana.