public static Task Nav_Resolution_Scaling_P3F_Scaling_Method(SocketReaction reaction, MenuIdStructure menuSession) { if (reaction.Emote.Name == "↩️") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Resolution_Scaling_P3F_Menu.Resolution_Scaling_P3F_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Keycap One else if (reaction.Emote.Name == "\u0031\ufe0f\u20e3") { // Get the account information of the user. var account = UserInfoClasses.GetAccount(menuSession.User); // Assign the chosen setting to the user's account. account.P3F_Scale = "Bicubic"; //Update the user's account. UserInfoClasses.UpdateAccount(account); // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Resolution_Scaling_P3F_Menu.Resolution_Scaling_P3F_Scaling_Method_Confirm(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } // Keycap Two else if (reaction.Emote.Name == "\u0032\ufe0f\u20e3") { // Get the account information of the user. var account = UserInfoClasses.GetAccount(menuSession.User); // Assign the chosen setting to the user's account. account.P3F_Scale = "Nearest Neighbor"; //Update the user's account. UserInfoClasses.UpdateAccount(account); // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Resolution_Scaling_P3F_Menu.Resolution_Scaling_P3F_Scaling_Method_Confirm(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } return(Task.CompletedTask); }
public static Task Nav_Resolution_Scaling_P3F_Scaling_Method_Confirm(SocketReaction reaction, MenuIdStructure menuSession) { if (reaction.Emote.Name == "💠") { // Stop the timeout timer associated with the menu. menuSession.MenuTimer.Stop(); // Go to a new menu. _ = Resolution_Scaling_P3F_Menu.Resolution_Scaling_P3F_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_Resolution_Scaling_VC_P3_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. _ = Resolution_Scaling_Menu.Resolution_Scaling_Main(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. _ = Resolution_Scaling_P3F_Menu.Resolution_Scaling_P3F_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. _ = Resolution_Scaling_P3P_Menu.Resolution_Scaling_P3P_Main(menuSession.User, menuSession.MenuMessage); return(Task.CompletedTask); } return(Task.CompletedTask); }