public static Task Nav_General_Settings_Main(SocketReaction reaction, MenuIdStructure menuSession) { if (reaction.Emote.Name == "↩️") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Settings_Menu.Settings_Main_Menu(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Keycap One else if (reaction.Emote.Name == "\u0031\ufe0f\u20e3") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Time_Weather_Menu.Time_Weather_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Keycap Two else if (reaction.Emote.Name == "\u0032\ufe0f\u20e3") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Level_Up_Notifications_Menu.Level_Up_Notifications_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Keycap Three else if (reaction.Emote.Name == "\u0033\ufe0f\u20e3") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Rank_Up_Notifications_Menu.Rank_Up_Notifications_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Keycap Four else if (reaction.Emote.Name == "\u0034\ufe0f\u20e3") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Content_Filter_Menu.Content_Filter_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } return(Task.CompletedTask); }
// Methods that suppliment the functionality of the menus. public static Task VersionControlMenuDirectory(SocketReaction reaction, MenuIdStructure menuSession) { // Search for a content filter list that corresponds to the user's ID. var filterSession = Global.ContentFilterList.SingleOrDefault(x => x.User.Id == reaction.UserId); // Get the account information of the command's user. var account = UserInfoClasses.GetAccount(menuSession.User); //Check each field of titles with alternate versions to see if they have been chosen. // Persona if (filterSession.P1_Select == true && (filterSession.P1_VC_PSX_Select == false && filterSession.P1_VC_PSP_Select == false)) { // Go to a new menu. _ = Content_Filter_Menu.Content_Filter_VC_P1_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Persona 2: Innocent Sin else if (filterSession.P2IS_Select == true && (filterSession.P2IS_VC_PSX_Select == false && filterSession.P2IS_VC_PSP_Select == false)) { // Go to a new menu. _ = Content_Filter_Menu.Content_Filter_VC_P2IS_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Persona 2: Eternal Punishment else if (filterSession.P2EP_Select == true && (filterSession.P2EP_VC_PSX_Select == false && filterSession.P2EP_VC_PSP_Select == false)) { // Go to a new menu. _ = Content_Filter_Menu.Content_Filter_VC_P2EP_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Persona 3 else if (filterSession.P3_Select == true && (filterSession.P3_VC_P3F_Select == false && filterSession.P3_VC_P3P_Select == false)) { // Go to a new menu. _ = Content_Filter_Menu.Content_Filter_VC_P3_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Persona 4 else if (filterSession.P4_Select == true && (filterSession.P4_VC_PS2_Select == false && filterSession.P4_VC_P4G_Select == false)) { // Go to a new menu. _ = Content_Filter_Menu.Content_Filter_VC_P4_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Persona 5 else if (filterSession.P5_Select == true && (filterSession.P5_VC_PS4_Select == false && filterSession.P5_VC_P5R_Select == false)) { // Go to a new menu. _ = Content_Filter_Menu.Content_Filter_VC_P5_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Now, assemble the user's content filter string. // Create an empty string variable that will represent the user's content filter string. string user_filter = ""; // Based on the titles the user selected, construct a content filter string for them. // Revelations: Persona if (filterSession.P1_VC_PSX_Select == true) { user_filter += "P1-PS1;"; } // Persona (Remake) if (filterSession.P1_VC_PSP_Select == true) { user_filter += "P1-PSP;"; } // Persona 2: Innocent Sin (PlayStation) if (filterSession.P2IS_VC_PSX_Select == true) { user_filter += "P2IS-PS1;"; } // Persona 2: Innocent Sin (Remake) if (filterSession.P2IS_VC_PSP_Select == true) { user_filter += "P2IS-PSP;"; } // Persona 2: Eternal Punishment (PlayStation) if (filterSession.P2EP_VC_PSX_Select == true) { user_filter += "P2EP-PS1;"; } // Persona 2: Eternal Punishment (Remake) if (filterSession.P2EP_VC_PSP_Select == true) { user_filter += "P2EP-PSP;"; } // Persona 3 FES if (filterSession.P3_VC_P3F_Select == true) { user_filter += "P3F;"; } // Persona 3 Portable if (filterSession.P3_VC_P3P_Select == true) { user_filter += "P3P;"; } // Persona 4 (PlayStation 2) if (filterSession.P4_VC_PS2_Select == true) { user_filter += "P4-PS2;"; } // Persona 4 Golden if (filterSession.P4_VC_P4G_Select == true) { user_filter += "P4G;"; } // Persona 4 Arena Ultimax if (filterSession.P4AU_Select == true) { user_filter += "P4AU;"; } // Persona 4: Dancing All Night if (filterSession.P4D_Select == true) { user_filter += "P4D;"; } // Persona 5 (PlayStation 4) if (filterSession.P5_VC_PS4_Select == true) { user_filter += "P5-PS4;"; } // Persona 5 Royal if (filterSession.P5_VC_P5R_Select == true) { user_filter += "P5R;"; } // BlazBlue: Cross Tag Battle if (filterSession.BBTAG_Select == true) { user_filter += "BBTAG;"; } // Assign the created content filter list to the user's account. account.Content_Filter = user_filter; // Next, check if the user completely filtered out any titles that match with their currently set profile theme. If so, set their profile theme to none. if ((account.Profile_Theme == "P3" && filterSession.P3_VC_P3F_Select == true && filterSession.P3_VC_P3P_Select == true) || (account.Profile_Theme == "P4" && filterSession.P4_VC_PS2_Select == true && filterSession.P4_VC_P4G_Select == true) || (account.Profile_Theme == "P5" && filterSession.P5_VC_PS4_Select == true && filterSession.P5_VC_P5R_Select == true)) { account.Profile_Theme = ""; } // Update the user's account with new data. UserInfoClasses.UpdateAccount(account); // Go to the confirmation menu. _ = Content_Filter_Menu.Content_Filter_Confirm(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); }