|
| 1 | +package id.frostfire.BotIoT; |
| 2 | + |
| 3 | +import id.frostfire.BotIoT.Discord.Discord; |
| 4 | +import id.frostfire.BotIoT.EndpointAPI.Publish; |
| 5 | +import id.frostfire.BotIoT.Telegram.Telegram; |
| 6 | +import id.frostfire.BotIoT.WhatsApp.WhatsApp; |
| 7 | +import it.auties.whatsapp.api.Whatsapp; |
| 8 | + |
| 9 | +import java.util.Scanner; |
| 10 | + |
| 11 | +import static spark.Spark.port; |
| 12 | + |
| 13 | +public class Main { |
| 14 | + public static String DcChnId; |
| 15 | + public static long TeleId; |
| 16 | + public static Boolean usewhatsapp = false; |
| 17 | + public static Boolean usediscord = false; |
| 18 | + public static boolean usetelegram = false; |
| 19 | + |
| 20 | + public static String Teletoken; |
| 21 | + |
| 22 | + public static void main(String[] args){ |
| 23 | + port(80); |
| 24 | + Scanner scn = new Scanner(System.in); |
| 25 | + System.out.println("Are You using WhatsApp?"); |
| 26 | + String wa = scn.nextLine(); |
| 27 | + if(wa.equals("y") || wa.equals("yes") || wa.equals("true")){ WhatsApp.client(); usewhatsapp = true;} |
| 28 | + System.out.println("Are You using Discord?"); |
| 29 | + String dc = scn.nextLine(); |
| 30 | + if(dc.equals("yes") || dc.equals("y") || dc.equals("true")){ |
| 31 | + usediscord = true; |
| 32 | + System.out.println("Please Insert your Discord Bot Token :"); |
| 33 | + String token = scn.nextLine(); |
| 34 | + Discord.Inisialize(token); |
| 35 | + System.out.println("Please Insert your ChannelID :"); |
| 36 | + DcChnId = scn.nextLine(); |
| 37 | + } |
| 38 | + System.out.println("Are you using Telegram?"); |
| 39 | + String tele = scn.nextLine(); |
| 40 | + if(tele.equals("y") || tele.equals("yes") || tele.equals("true")){ |
| 41 | + System.out.println("Please Insert your Telegram Bot Token :"); |
| 42 | + Teletoken = scn.nextLine(); |
| 43 | + Telegram.inisialize(); |
| 44 | + System.out.println("Please Insert your IDcontact :"); |
| 45 | + TeleId = scn.nextLong(); |
| 46 | + usetelegram = true; |
| 47 | + } |
| 48 | + Publish.event(); |
| 49 | + if(usewhatsapp) System.out.println(WhatsApp.pesan(Whatsapp.webBuilder().lastConnection().build().connect().join(), |
| 50 | + "+6285236486026", |
| 51 | + "Server Menyala")); |
| 52 | + System.out.println("Server Menyala"); |
| 53 | + } |
| 54 | +} |
0 commit comments