public static Task Nav_Settings_Main_Menu(SocketReaction reaction, MenuIdStructure menuSession) { // Keycap One if (reaction.Emote.Name == "\u0031\ufe0f\u20e3") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = General_Settings_Menu.General_Settings_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. _ = Profile_Settings_Menu.Profile_Settings_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. _ = SM_Settings_Menu.SM_Settings_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } else if (reaction.Emote.Name == "❌") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Attempt to delete the menu message from the channel if it hasn't been deleted by the user yet. If this fails, catch the exception. try { _ = menuSession.MenuMessage.DeleteAsync(); } catch (Exception ex) { Console.WriteLine(ex); } // If the menu session is not null, remove it from the global list. if (menuSession != null) { Global.MenuIdList.Remove(menuSession); } return(Task.CompletedTask); } return(Task.CompletedTask); }
public static Task Nav_Star_Level_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. _ = Profile_Settings_Menu.Profile_Settings_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } else if (reaction.Emote.Name == "✅") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Star_Level_Menu.Star_Level_Check(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } return(Task.CompletedTask); }
public static Task Nav_Star_Level_Check(SocketReaction reaction, MenuIdStructure menuSession) { if (reaction.Emote.Name == "💠") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Profile_Settings_Menu.Profile_Settings_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } else if (reaction.Emote.Name == "⭐" || reaction.Emote.Name == "🌟" || reaction.Emote.Name == "✨") { // Get the account information of the user. var account = UserInfoClasses.GetAccount(menuSession.User); // If the user is below Star Level Rank 2, reset their level and total EXP to their base values. if (account.Level_Resets < 2) { account.Level = 1; account.Total_Exp = 0; } // If the user is currently at Star Level Rank 2, max out their P-Medal value. if (account.Level_Resets == 2) { account.P_Medals = 999; } // Increase the user's level reset value by 1. account.Level_Resets += 1; //Update the user's account. UserInfoClasses.UpdateAccount(account); // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Star_Level_Menu.Star_Level_Confirm(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } return(Task.CompletedTask); }
public static Task Nav_Profile_Theme_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. _ = Profile_Settings_Menu.Profile_Settings_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } else if (reaction.Emote.Name == "P3") { // Get the account information of the user. var account = UserInfoClasses.GetAccount(menuSession.User); // Assign the chosen profile theme to the user's account. account.Profile_Theme = "P3"; //Update the user's account. UserInfoClasses.UpdateAccount(account); // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Profile_Theme_Menu.Profile_Theme_Confirm(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } else if (reaction.Emote.Name == "P4") { // Get the account information of the user. var account = UserInfoClasses.GetAccount(menuSession.User); // Assign the chosen profile theme to the user's account. account.Profile_Theme = "P4"; //Update the user's account. UserInfoClasses.UpdateAccount(account); // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Profile_Theme_Menu.Profile_Theme_Confirm(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } else if (reaction.Emote.Name == "P5") { // Get the account information of the user. var account = UserInfoClasses.GetAccount(menuSession.User); // Assign the chosen profile theme to the user's account. account.Profile_Theme = "P5"; //Update the user's account. UserInfoClasses.UpdateAccount(account); // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Profile_Theme_Menu.Profile_Theme_Confirm(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } return(Task.CompletedTask); }