File tree 4 files changed +9
-4
lines changed
4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -86,4 +86,7 @@ typings/
86
86
.webpack /
87
87
88
88
# Electron-Forge
89
- out /
89
+ out /
90
+
91
+ src /bots /*
92
+ ! src /bots /.gitkeep
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ ipcMain.on('loadTreeview', (event) => {
7
7
8
8
const json = new Array ( ) ; ;
9
9
readdirSync ( path . join ( __dirname , 'bots' ) ) . forEach ( bot => {
10
+ if ( bot == '.gitkeep' ) return ;
11
+
10
12
const botId = bot . replace ( / / g, "_" ) ;
11
13
12
14
json . push ( {
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ function addToTree(name) {
82
82
const events = readdirSync ( path . join ( __dirname , `/bots/${ name } /events/${ dir } /` ) ) . filter ( files => files . endsWith ( '.js' ) ) ;
83
83
for ( const file of events ) {
84
84
html += `<div role="treeitem" class="list-group-item" style="padding-left:4.2rem;" aria-level="4" id="${ id } -events-${ dir } -${ file . slice ( 0 , - 3 ) } ">
85
- ${ file . slice ( 0 , - 3 ) } </div>`
85
+ ${ file } </div>`
86
86
} ;
87
87
html += `</div></div>` ;
88
88
} ) ;
@@ -96,10 +96,10 @@ function addToTree(name) {
96
96
<i class="state-icon fa fa-angle-right fa-fw"></i>${ dir } </div>
97
97
<div role="group" class="list-group collapse" id="tree-item-${ id } -commands-${ dir } ">` ;
98
98
99
- const commands = readdirSync ( path . join ( __dirname , `/bots/${ id } /commands/${ dir } /` ) ) . filter ( files => files . endsWith ( '.js' ) ) ;
99
+ const commands = readdirSync ( path . join ( __dirname , `/bots/${ name } /commands/${ dir } /` ) ) . filter ( files => files . endsWith ( '.js' ) ) ;
100
100
for ( const file of commands ) {
101
101
html += `<div role="treeitem" class="list-group-item" data-bs-toggle="collapse" style="padding-left:4.2rem;" aria-level="4" id="${ id } -commands-${ dir } -${ file . slice ( 0 , - 3 ) } ">
102
- ${ file . slice ( 0 , - 3 ) } </div>`
102
+ ${ file } </div>`
103
103
} ;
104
104
html += `</div></div>` ;
105
105
} ) ;
You can’t perform that action at this time.
0 commit comments