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);
        }
Beispiel #2
0
        public static Task Nav_Sheet_Order_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.
                _ = SM_Settings_Menu.SM_Settings_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.Setting_Sheet_Order = "Order by Outfit";

                //Update the user's account.
                UserInfoClasses.UpdateAccount(account);

                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Sheet_Order_Menu.Sheet_Order_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.Setting_Sheet_Order = "Order by Expression";

                //Update the user's account.
                UserInfoClasses.UpdateAccount(account);

                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Sheet_Order_Menu.Sheet_Order_Confirm(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            return(Task.CompletedTask);
        }
        public static Task Nav_Auto_Delete_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.
                _ = SM_Settings_Menu.SM_Settings_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.
                _ = Auto_Delete_Menu.Auto_Delete_Commands(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.
                _ = Auto_Delete_Menu.Auto_Delete_Error_Messages(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            return(Task.CompletedTask);
        }
        // Methods that activate on the ReactionAdded event.
        public static Task Nav_Backgrounds_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.
                _ = SM_Settings_Menu.SM_Settings_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.
                _ = Backgrounds_Menu.Backgrounds_Default_Color(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.
                _ = Backgrounds_Menu.Backgrounds_Upload_Settings(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            return(Task.CompletedTask);
        }
        public static Task Nav_Template_Layout_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.
                _ = SM_Settings_Menu.SM_Settings_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P1")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_VC_Menu.Template_Layout_VC_P1_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P2IS")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_VC_Menu.Template_Layout_VC_P2IS_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P2EP")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_VC_Menu.Template_Layout_VC_P2EP_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P3")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_VC_Menu.Template_Layout_VC_P3_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P4")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_VC_Menu.Template_Layout_VC_P4_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P4AU")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_P4AU_Menu.Template_Layout_P4AU_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P4D")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_P4D_Menu.Template_Layout_P4D_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P5")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_VC_Menu.Template_Layout_VC_P5_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P5S")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_P5S_Menu.Template_Layout_P5S_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "BBTAG")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Template_Layout_BBTAG_Menu.Template_Layout_BBTAG_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            return(Task.CompletedTask);
        }
        public static Task Nav_Version_Control_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.
                _ = SM_Settings_Menu.SM_Settings_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P1")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Version_Control_Menu.Version_Control_P1(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P2IS")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Version_Control_Menu.Version_Control_P2IS(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P2EP")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Version_Control_Menu.Version_Control_P2EP(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P3")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Version_Control_Menu.Version_Control_P3(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P4")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Version_Control_Menu.Version_Control_P4(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }
            else if (reaction.Emote.Name == "P5")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Version_Control_Menu.Version_Control_P5(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            return(Task.CompletedTask);
        }
Beispiel #7
0
        public static Task Nav_Resolution_Scaling_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.
                _ = SM_Settings_Menu.SM_Settings_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            else if (reaction.Emote.Name == "P1")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Resolution_Scaling_VC_Menu.Resolution_Scaling_VC_P1_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            else if (reaction.Emote.Name == "P2IS")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Resolution_Scaling_VC_Menu.Resolution_Scaling_VC_P2IS_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            else if (reaction.Emote.Name == "P2EP")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Resolution_Scaling_VC_Menu.Resolution_Scaling_VC_P2EP_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            else if (reaction.Emote.Name == "P3")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Resolution_Scaling_VC_Menu.Resolution_Scaling_VC_P3_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            else if (reaction.Emote.Name == "P4")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Resolution_Scaling_P4_PS2_Menu.Resolution_Scaling_P4_PS2_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            else if (reaction.Emote.Name == "P4AU")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Resolution_Scaling_P4AU_Menu.Resolution_Scaling_P4AU_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            else if (reaction.Emote.Name == "P4D")
            {
                // Stop the timeout timer associated with the menu.
                menuSession.MenuTimer.Stop();

                // Go to a new menu.
                _ = Resolution_Scaling_P4D_Menu.Resolution_Scaling_P4D_Main(menuSession.User, menuSession.MenuMessage);
                return(Task.CompletedTask);
            }

            return(Task.CompletedTask);
        }