public static Task Nav_Profile_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 _ = Profile_Theme_Menu.Profile_Theme_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 _ = Status_Decor_Menu.Status_Decor_Start(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } else if (reaction.Emote.Name == "⭐" || reaction.Emote.Name == "🌟" || reaction.Emote.Name == "✨") { // Stop the timeout timer associated with the menu menuSession.MenuTimer.Stop(); // Go to a new menu _ = Star_Level_Menu.Star_Level_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } return(Task.CompletedTask); }
public static Task Nav_Decor_Sort_Confirm(SocketReaction reaction, MenuIdStructure menuSession) { // Search for an item list that corresponds to the user's ID. If a menu entry was found, this should also exist alongside it. var itemSession = Global.ItemIdList.SingleOrDefault(x => x.User.Id == reaction.UserId); if (reaction.Emote.Name == "💠") { // If the item session is not null, remove it from the global list. if (menuSession != null) { Global.ItemIdList.Remove(itemSession); } // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Status_Decor_Menu.Status_Decor_Start(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); }