@@ -24,6 +24,8 @@ globalThis.Underline = {
2424 SlashCommand : require ( "./types/SlashCommand" ) ,
2525 MessageAction : require ( "./types/MessageAction" ) ,
2626 UserAction : require ( "./types/UserAction" ) ,
27+ SelectMenu : require ( "./types/SelectMenu" ) ,
28+ Button : require ( "./types/Button" ) ,
2729}
2830
2931console . info ( "[BİLGİ] Basit Altyapı v1.8.5 - by Kıraç Armağan Önal" ) ;
@@ -51,7 +53,7 @@ console.info("[BİLGİ] Basit Altyapı v1.8.5 - by Kıraç Armağan Önal");
5153 /** @type {import("./types/Interaction") } */
5254 let uInter = require ( interactionFile ) ;
5355
54- if ( uInter ?. _type != "interaction" ) {
56+ if ( uInter ?. _type != "interaction" && uInter ?. _type != "noDeployInteraction" ) {
5557 console . warn ( `[UYARI] "${ rltPath } " interaksiyon dosyası boş. Atlanıyor..` ) ;
5658 return ;
5759 }
@@ -147,11 +149,16 @@ console.info("[BİLGİ] Basit Altyapı v1.8.5 - by Kıraç Armağan Önal");
147149 let subCommandGroupName = "" ;
148150 try { subCommandGroupName = interaction . options . getSubcommandGroup ( ) ; } catch { } ;
149151
150- let uInter = Underline . interactions . find ( uInter => {
152+ let uInter = Underline . interactions . find ( uInter => {
151153 switch ( uInter . name . length ) {
152- case 1 : return uInter . name [ 0 ] == interaction . commandName ;
153- case 2 : return uInter . name [ 0 ] == interaction . commandName && uInter . name [ 1 ] == subCommandName ;
154- case 3 : return uInter . name [ 0 ] == interaction . commandName && uInter . name [ 1 ] == subCommandGroupName && uInter . name [ 2 ] == subCommandName ;
154+ case 1 : return ( uInter . name [ 0 ] == interaction . commandName ) || ( ( uInter . name [ 0 ] == interaction . customId ) && (
155+ ( uInter . actionType == "CHAT_INPUT" && ( interaction . isCommand ( ) || interaction . isAutocomplete ( ) ) ) ||
156+ ( uInter . actionType == "SELECT_MENU" && interaction . isSelectMenu ( ) ) ||
157+ ( uInter . actionType == "BUTTON" && interaction . isButton ( ) ) ||
158+ ( ( uInter . actionType == "USER" || uInter . actionType == "MESSAGE" ) && interaction . isContextMenu ( ) )
159+ ) ) ;
160+ case 2 : return uInter . name [ 0 ] == interaction . commandName && uInter . name [ 1 ] == subCommandName && ( interaction . isCommand ( ) || interaction . isAutocomplete ( ) ) ;
161+ case 3 : return uInter . name [ 0 ] == interaction . commandName && uInter . name [ 1 ] == subCommandGroupName && uInter . name [ 2 ] == subCommandName && ( interaction . isCommand ( ) || interaction . isAutocomplete ( ) ) ;
155162 }
156163 } ) ;
157164
@@ -169,8 +176,6 @@ console.info("[BİLGİ] Basit Altyapı v1.8.5 - by Kıraç Armağan Önal");
169176 return ;
170177 }
171178
172- if ( ! ( interaction . isCommand ( ) || interaction . isContextMenu ( ) ) ) return ;
173-
174179 let other = { } ;
175180
176181 let shouldRun1 = await config . onInteractionBeforeChecks ( uInter , interaction , other ) ;
0 commit comments