1- package de . skyking_px . PhoenixBot ;
1+ package com . mcsmanager . bot ;
22
3- import de . skyking_px . PhoenixBot .command .CloseCommand ;
4- import de . skyking_px . PhoenixBot .command .FAQCommand ;
5- import de . skyking_px . PhoenixBot .command .InfoCommand ;
6- import de . skyking_px . PhoenixBot . command . TBSCommand ;
7- import de . skyking_px . PhoenixBot . faq . FaqHandler ;
8- import de . skyking_px . PhoenixBot .listener .BugReportListener ;
9- import de . skyking_px . PhoenixBot .listener .SuggestionListener ;
10- import de . skyking_px . PhoenixBot .listener .SupportListener ;
11- import de . skyking_px . PhoenixBot . listener . ThreadDeleteListener ;
12- import de . skyking_px . PhoenixBot . storage . TicketStorage ;
13- import de . skyking_px . PhoenixBot . storage . VoteStorage ;
14- import de . skyking_px . PhoenixBot . ticket . Panel ;
15- import de . skyking_px . PhoenixBot . util .* ;
3+ import com . mcsmanager . bot .command .CloseCommand ;
4+ import com . mcsmanager . bot .command .FAQCommand ;
5+ import com . mcsmanager . bot .command .InfoCommand ;
6+ import com . mcsmanager . bot . faq . FaqHandler ;
7+ import com . mcsmanager . bot . listener . BugReportListener ;
8+ import com . mcsmanager . bot .listener .SuggestionListener ;
9+ import com . mcsmanager . bot .listener .SupportListener ;
10+ import com . mcsmanager . bot .listener .ThreadDeleteListener ;
11+ import com . mcsmanager . bot . util . CloseHandler ;
12+ import com . mcsmanager . bot . util . LogUploader ;
13+ import com . mcsmanager . bot . util . LogUtils ;
14+ import com . mcsmanager . bot . util . Reload ;
15+ import com . mcsmanager . bot . storage . VoteStorage ;
1616import net .dv8tion .jda .api .JDA ;
1717import net .dv8tion .jda .api .JDABuilder ;
1818import net .dv8tion .jda .api .OnlineStatus ;
2222import java .io .IOException ;
2323
2424/**
25- * Main Bot class for the PhoenixBot Discord application.
25+ * Main Bot class for the MCSM Discord Bot Discord application.
2626 * This class initializes the bot, registers event listeners, and configures JDA.
2727 *
2828 * @author SkyKing_PX
2929 */
3030public class Bot {
3131 /** Current version of the bot */
32- public static final String VERSION = "2 .0.0-rc6 " ;
32+ public static final String VERSION = "1 .0.0" ;
3333
3434
3535 /** Storage for vote data across suggestion forums */
3636 private static VoteStorage voteStorage ;
37- /** Storage for ticket data and tracking */
38- private static TicketStorage ticketStorage ;
3937
4038 /**
4139 * Initializes the storage systems for votes and tickets.
@@ -51,13 +49,6 @@ public static void initStorage() {
5149 LogUtils .logFatalException ("Error initializing vote storage" , e );
5250 }
5351 LogUtils .logStorage ("Initialized" , "Vote Storage" );
54- LogUtils .logStorage ("Initializing..." , "Ticket Storage" );
55- try {
56- ticketStorage = new TicketStorage ();
57- } catch (Exception e ) {
58- LogUtils .logFatalException ("Error initializing ticket storage" , e );
59- }
60- LogUtils .logStorage ("Initializing" , "Ticket Storage" );
6152 }
6253
6354 /**
@@ -68,29 +59,26 @@ public static void initStorage() {
6859 public static VoteStorage getVoteStorage () {
6960 return voteStorage ;
7061 }
71-
72- /**
73- * Gets the ticket storage instance for managing support tickets.
74- *
75- * @return The ticket storage instance
76- */
77- public static TicketStorage getTicketStorage () {
78- return ticketStorage ;
79- }
8062
8163 /**
82- * Main entry point for the PhoenixBot application.
64+ * Main entry point for the MCSM Discord Bot application.
8365 * Initializes storage, configures JDA, and registers all event listeners.
8466 *
8567 * @param args Command line arguments (not used)
8668 * @throws Exception If any error occurs during initialization
8769 */
8870 public static void main (String [] args ) throws Exception {
8971 initStorage ();
72+ String activity = "Incorrect Configuration" ;
73+ try {
74+ activity = Config .get ().getBot ().getActivity ();
75+ activity = activity .replace ("{Version}" , Bot .VERSION );
76+ } catch (Exception e ) {
77+ LogUtils .logException ("Error while getting Bot Activity from Config. It may be corrupt." , e );
78+ }
9079
9180 JDA api = JDABuilder .createDefault (Config .get ().getBot ().getToken ())
9281 .addEventListeners (
93- new TBSCommand (),
9482 new InfoCommand (),
9583 new FAQCommand (),
9684 new LogUploader (),
@@ -102,11 +90,9 @@ public static void main(String[] args) throws Exception {
10290 new CloseHandler (),
10391 new FaqHandler (),
10492 new Reload (),
105- new Panel (),
106- new TicketCloseHandler (),
10793 new ThreadDeleteListener ())
10894 .enableIntents (GatewayIntent .MESSAGE_CONTENT )
109- .setActivity (Activity .playing (Config . get (). getBot (). getActivity () ))
95+ .setActivity (Activity .playing (activity ))
11096 .setStatus (OnlineStatus .ONLINE )
11197 .build ();
11298 }
0 commit comments