File tree Expand file tree Collapse file tree 4 files changed +9
-1
lines changed Expand file tree Collapse file tree 4 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,5 +13,6 @@ module.exports = new Underline.SlashCommand({
1313 coolDown : {
1414 type : "any" ,
1515 amount : 180000
16- }
16+ } ,
17+ publishType : "guildOnly"
1718} )
Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ module.exports = new Underline.${transformer[interActionType] ?? ""}({
233233 },
234234 ${ interActionType == "MESSAGE" || interActionType == "USER" ? "" : `options: ${ interActionType == "BUTTON" || interActionType == "SELECT_MENU" ? "{}" : "[]" } ,` }
235235 ${ interCoolDown ? `coolDown: ${ interCoolDown } ,` : "" }
236+ ${ interActionType == "MESSAGE" || interActionType == "USER" ? "publishType: \"all\"," : "" }
236237 guildOnly: ${ interGuildOnly } ${ interBotPerms . length > 0 || interUserPerms . length > 0 ? `,` : "" }
237238 ${ interBotPerms . length > 0 || interUserPerms . length > 0 ? `perms: {` : "" }
238239 ${ interBotPerms . length > 0 ? ` bot: ${ JSON . stringify ( interBotPerms ) } ,` : "" }
Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ globalThis.Underline = {
5858 /** @type {import("./types/Interaction") } */
5959 let uInter = require ( interactionFilePath ) ;
6060 if ( uInter ?. _type != "interaction" ) return ;
61+ if ( ! uInter . publishType ) uInter . publishType = "all" ;
62+ if ( ! ( uInter . publishType == "all" || ( uInter . publishType == "guildOnly" && publishMode == "global" ) || ( uInter . publishType == "globalOnly" && publishMode == "global" ) ) ) {
63+ console . warn ( `Interaksiyon "${ uInter . actionType == "CHAT_INPUT" ? `/${ uInter . name . join ( " " ) } ` : `${ uInter . name [ 0 ] } ` } " dönüştürülme listesine eklenmedi çünkü interaksiyon paylaşılma tipi(${ uInter . publishType } ) ile paylaşma modu(${ publishMode } ) uyumsuz!` ) ;
64+ return ;
65+ }
6166 console . info ( `Interaksiyon "${ uInter . actionType == "CHAT_INPUT" ? `/${ uInter . name . join ( " " ) } ` : `${ uInter . name [ 0 ] } ` } " dönüştürülme listesine eklendi!` ) ;
6267 uInters . push ( uInter ) ;
6368 } ) ;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ export class BaseInteraction {
5454 perms ?: { bot : PermissionString [ ] , user : UserPermString [ ] } ;
5555 onInteraction ( interaction : CommandInteraction | ContextMenuInteraction , other : IOther ) : void ;
5656 toJSON ( ) : MessageButton | MessageSelectMenu | undefined ;
57+ publishType ?: "globalOnly" | "guildOnly" | "all" ;
5758 onLoad ?( client : Client ) : void ;
5859 coolDowns : Map < string , number > ;
5960 description ! : string ;
You can’t perform that action at this time.
0 commit comments