Skip to content

Commit aa1e2f7

Browse files
committed
add bots to gitignore
1 parent 1a98179 commit aa1e2f7

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,7 @@ typings/
8686
.webpack/
8787

8888
# Electron-Forge
89-
out/
89+
out/
90+
91+
src/bots/*
92+
!src/bots/.gitkeep

src/bots/.gitkeep

Whitespace-only changes.

src/load.js

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ ipcMain.on('loadTreeview', (event) => {
77

88
const json = new Array();;
99
readdirSync(path.join(__dirname, 'bots')).forEach(bot => {
10+
if (bot == '.gitkeep') return;
11+
1012
const botId = bot.replace(/ /g, "_");
1113

1214
json.push({

src/renderer.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function addToTree(name) {
8282
const events = readdirSync(path.join(__dirname, `/bots/${name}/events/${dir}/`)).filter(files => files.endsWith('.js'));
8383
for (const file of events) {
8484
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>`
8686
};
8787
html += `</div></div>`;
8888
});
@@ -96,10 +96,10 @@ function addToTree(name) {
9696
<i class="state-icon fa fa-angle-right fa-fw"></i>${dir}</div>
9797
<div role="group" class="list-group collapse" id="tree-item-${id}-commands-${dir}">`;
9898

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'));
100100
for (const file of commands) {
101101
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>`
103103
};
104104
html += `</div></div>`;
105105
});

0 commit comments

Comments
 (0)