Skip to content

Commit ecc040a

Browse files
committed
[5.5] LSCSO renamed to LSSD
- Renamed LSCSO to LSSD - Leaving support of Legacy Website
1 parent d4b8bad commit ecc040a

23 files changed

+72
-72
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414
*Český Discord bot pro Law Enforcement Agencies na GTA V FiveM roleplay serveru [VegasRP by Nolimit](https://nlmt.cc/).*
1515

16-
*Aktuálně podporuje sbory LSPD <img src="https://i.imgur.com/gfL0fGf.png" width="15" height="15"/> a LSCSO <img src="https://i.imgur.com/Hex0MQF.png" width="15" height="15"/>.*
16+
*Aktuálně podporuje sbory LSPD <img src="https://i.imgur.com/gfL0fGf.png" width="15" height="15"/> a LSSD <img src="https://i.imgur.com/X3cH2iu.png" width="15" height="15"/>.*
1717

1818
Funkce:
1919
- zápis služeb zaměstnanců
2020
- zápis omluvenek zaměstnanců
2121
- kontrola absence při událostech
2222
- zápis do blacklistu
2323
- webové tabulky *(HTML+JS+CSS s Express.js a API)*
24-
- LSCSO tabulky
24+
- LSSD tabulky
2525
- LSPD tabulky
2626
- blacklist (ze seznamu v DB)
2727
- divize (z rolí na Discord serverech)

db/blacklist.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"username": "smith01",
77
"id": "0000000000000000001",
88
"from": {
9-
"dep": "LSCSO",
9+
"dep": "LSSD",
1010
"name": "Dwayne Johnson",
1111
"username": "dwayne02",
1212
"displayName": "TheRock",

db/cache.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"username": "smith01",
77
"global_name": "William",
88
"avatar": "1ab2cd3ef",
9-
"from": "LSCSO"
9+
"from": "LSSD"
1010
}
1111
]

docs/privacy-policy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LEA Bot | Zásady Ochrany Osobních Údajů
22
- Vytvořil **[@PetyXbron aka b1ngo](https://github.com/PetyXbron/)**
33
- Zdrojový kód je častěčně veřejný na platformě GitHub.
4-
- LEA Bot primárně slouží pouze pro smyšlené policejní sbory **Los Santos Police Department** a **Los Santos County Sheriff Office** FiveM serveru **[VegasRP by Nolimit](https://nlmt.cc/)**. Jeho jiné používání není doporučeno a je nutné se řídit podmínkami.
4+
- LEA Bot primárně slouží pouze pro smyšlené policejní sbory **Los Santos Police Department** a **Los Santos Sheriff Department** FiveM serveru **[VegasRP by Nolimit](https://nlmt.cc/)**. Jeho jiné používání není doporučeno a je nutné se řídit podmínkami.
55
- Používáním dodržujete **[licenci](/LICENSE.md)**
66

77
[![Creative Commons License](https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-nd/4.0/)

docs/terms-of-use.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LEA Bot | Podmínky Použití (TOS)
22
- Vytvořil **[@PetyXbron aka b1ngo](https://github.com/PetyXbron/)**
33
- Zdrojový kód je častěčně veřejný na platformě GitHub.
4-
- LEA Bot primárně slouží pouze pro smyšlené policejní sbory **Los Santos Police Department** a **Los Santos County Sheriff Office** FiveM serveru **[VegasRP by Nolimit](https://nlmt.cc/)**. Jeho jiné používání není doporučeno a je nutné se řídit podmínkami.
4+
- LEA Bot primárně slouží pouze pro smyšlené policejní sbory **Los Santos Police Department** a **Los Santos Sheriff Department** FiveM serveru **[VegasRP by Nolimit](https://nlmt.cc/)**. Jeho jiné používání není doporučeno a je nutné se řídit podmínkami.
55
- Používáním dodržujete **[licenci](/LICENSE.md)**
66

77
[![Creative Commons License](https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-nd/4.0/)

docs/usage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LEA Bot | JAK POUŽÍVAT
22
- Vytvořil **[@PetyXbron aka b1ngo](https://github.com/PetyXbron/)**
33
- Zdrojový kód je častěčně veřejný na platformě GitHub.
4-
- LEA Bot primárně slouží pouze pro smyšlené policejní sbory **Los Santos Police Department** a **Los Santos County Sheriff Office** FiveM serveru **[VegasRP by Nolimit](https://nlmt.cc/)**. Jeho jiné používání není doporučeno a je nutné se řídit podmínkami.
4+
- LEA Bot primárně slouží pouze pro smyšlené policejní sbory **Los Santos Police Department** a **Los Santos Sheriff Department** FiveM serveru **[VegasRP by Nolimit](https://nlmt.cc/)**. Jeho jiné používání není doporučeno a je nutné se řídit podmínkami.
55
- Používáním dodržujete **[licenci](/LICENSE.md)**
66

77
[![Creative Commons License](https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-nd/4.0/)
@@ -48,7 +48,7 @@ Bot se hlavně zatím používá pomocí jednoduchých příkazů:
4848
- ✅ značí příkaz, který je v téhle verzi **funkční**
4949
- ❌ značí příkaz, který je v téhle verzi **nefunkční / nedokončený**
5050

51-
Zároveň nově hostuje stránky s **LSPD, LSCSO tabulkami, jejich divizemi a blacklistem** na bázi Express.js, HTML+CSS+JS.
51+
Zároveň nově hostuje stránky s **LSPD, LSSD tabulkami, jejich divizemi a blacklistem** na bázi Express.js, HTML+CSS+JS.
5252
Ty se aktualizují **přímo z databáze a Discord serverů** po každém načtení stránky.
5353

5454
#### 1. Zapsání duty

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bot.LEA = {
5959
LSPD: [
6060
"1154446248934387828"
6161
],
62-
LSCSO: [
62+
LSSD: [
6363
"1139266097921675345"
6464
]
6565
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lea-bot",
3-
"version": "5.4",
3+
"version": "5.5",
44
"description": "VegasRP (FiveM GTA V roleplay) Discord bot for LEA - making internal police department actions easier.",
55
"type": "module",
66
"main": "index.js",

src/commands/blacklist.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default async function run(bot, i) {
5151
if (admin.id === "411436203330502658") passed = true; //PetyXbron / b1ngo
5252
if (bot.LEA.g.LSPD.includes(i.guild.id) && !passed) {
5353
if (admin.roles.cache.has("1267541873451339806")) passed = true; //Leadership
54-
} else if (bot.LEA.g.LSCSO.includes(i.guild.id) && !passed) {
54+
} else if (bot.LEA.g.LSSD.includes(i.guild.id) && !passed) {
5555
if (admin.roles.cache.has("1139267137651884072")) passed = true; //Leadership
5656
}
5757

src/commands/db.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default async function run(bot, i) {
4141
if (admin.id === "411436203330502658") passed = true; //PetyXbron / b1ngo
4242
if (bot.LEA.g.LSPD.includes(i.guild.id) && !passed) {
4343
if (admin.roles.cache.has("1267541873451339806")) passed = true; //Leadership
44-
} else if (bot.LEA.g.LSCSO.includes(i.guild.id) && !passed) {
44+
} else if (bot.LEA.g.LSSD.includes(i.guild.id) && !passed) {
4545
if (admin.roles.cache.has("1139267137651884072")) passed = true; //Leadership
4646
if (admin.roles.cache.has("1139295201282764882")) passed = true; //FTO Commander
4747
}
@@ -102,12 +102,12 @@ export default async function run(bot, i) {
102102
} else if (choice === "z") {
103103
let log, sbor;
104104
if (bot.LEA.g.LSPD.includes(i.guild.id)) log = path.resolve("./db/LSPD") + "/" + user.id + ".json", sbor = "LSPD";
105-
else if (bot.LEA.g.LSCSO.includes(i.guild.id)) log = path.resolve("./db/LSCSO") + "/" + user.id + ".json", sbor = "LSCSO";
105+
else if (bot.LEA.g.LSSD.includes(i.guild.id)) log = path.resolve("./db/LSSD") + "/" + user.id + ".json", sbor = "LSSD";
106106
else return i.reply({ content: "> 🛑 **Tenhle server není uveden a seznamu.**\nKontaktuj majitele (viz. </menu:1170376396678377596>).", ephemeral: true });
107107

108108
if (!fs.existsSync(log)) {
109-
if (bot.LEA.g.LSPD.includes(i.guild.id)) log = path.resolve("./db/LSCSO") + "/" + user.id + ".json", sbor = "LSCSO";
110-
else if (bot.LEA.g.LSCSO.includes(i.guild.id)) log = path.resolve("./db/LSPD") + "/" + user.id + ".json", sbor = "LSPD";
109+
if (bot.LEA.g.LSPD.includes(i.guild.id)) log = path.resolve("./db/LSSD") + "/" + user.id + ".json", sbor = "LSSD";
110+
else if (bot.LEA.g.LSSD.includes(i.guild.id)) log = path.resolve("./db/LSPD") + "/" + user.id + ".json", sbor = "LSPD";
111111
}
112112

113113
console.log(" < [CMD/DB] > " + i.member.displayName + ` zobrazil(a) DB záznam ${user.id}.json`);
@@ -225,7 +225,7 @@ export default async function run(bot, i) {
225225

226226
let loc, worker, workerGuildID;
227227
if (bot.LEA.g.LSPD.includes(i.guild.id)) loc = path.resolve("./db/LSPD") + "/" + user.id + ".json";
228-
else if (bot.LEA.g.LSCSO.includes(i.guild.id)) loc = path.resolve("./db/LSCSO") + "/" + user.id + ".json";
228+
else if (bot.LEA.g.LSSD.includes(i.guild.id)) loc = path.resolve("./db/LSSD") + "/" + user.id + ".json";
229229
else return i.reply({ content: "> 🛑 **Tenhle server není uveden a seznamu.**\nKontaktuj majitele (viz. </menu:1170376396678377596>).", ephemeral: true });
230230

231231
const admins = [
@@ -256,11 +256,11 @@ export default async function run(bot, i) {
256256

257257
collector.on('collect', async c => {
258258
if (bot.LEA.g.LSPD.includes(c.guild.id))
259-
loc = path.resolve("./db/LSCSO") + "/" + user.id + ".json", worker = JSON.parse(fs.readFileSync(loc, "utf-8")),
259+
loc = path.resolve("./db/LSSD") + "/" + user.id + ".json", worker = JSON.parse(fs.readFileSync(loc, "utf-8")),
260260
workerGuildID = bot.LEA.g.LSPD[0];
261-
else if (bot.LEA.g.LSCSO.includes(c.guild.id))
261+
else if (bot.LEA.g.LSSD.includes(c.guild.id))
262262
loc = path.resolve("./db/LSPD") + "/" + user.id + ".json", worker = JSON.parse(fs.readFileSync(loc, "utf-8")),
263-
workerGuildID = bot.LEA.g.LSCSO[0];
263+
workerGuildID = bot.LEA.g.LSSD[0];
264264

265265
i.editReply({ content: `**Tenhle záznam (<@${user.id}>) byl vymazán z DB!**\n-# *Pozor, bot neodebral role!*`, files: [loc], components: [] });
266266

src/commands/event.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ export default async function run(bot, i) {
3838
i.guild.fetch();
3939
const admin = i.member;
4040
if (admin.id === "411436203330502658") passed = true; //PetyXbron / b1ngo
41-
if (bot.LEA.g.LSCSO.includes(i.guild.id) && !passed) {
41+
if (bot.LEA.g.LSSD.includes(i.guild.id) && !passed) {
4242
if (admin.roles.cache.has("1139267137651884072")) passed = true; //Leadership
4343
}
4444

45-
if (!bot.LEA.g.LSCSO.includes(i.guild.id)) return i.reply({
45+
if (!bot.LEA.g.LSSD.includes(i.guild.id)) return i.reply({
4646
content: "> 🛑 **Příkazy /event nejsou aktuálně dostupné pro " + i.guild.name + ".**",
4747
ephemeral: true
4848
});

src/commands/leader.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default async function run(bot, i) {
3737
if (admin.id === "411436203330502658") passed = true; //PetyXbron / b1ngo
3838
if (bot.LEA.g.LSPD.includes(i.guild.id) && !passed) {
3939
if (admin.roles.cache.has("1267541873451339806")) passed = true; //Leadership
40-
} else if (bot.LEA.g.LSCSO.includes(i.guild.id) && !passed) {
40+
} else if (bot.LEA.g.LSSD.includes(i.guild.id) && !passed) {
4141
if (admin.roles.cache.has("1139267137651884072")) passed = true; //Leadership
4242
if (admin.roles.cache.has("1139295201282764882")) passed = true; //FTO Commander
4343
}
@@ -97,11 +97,11 @@ export default async function run(bot, i) {
9797

9898
let users = [], db;
9999
if (bot.LEA.g.LSPD.includes(i.guild.id)) db = fs.readdirSync(path.resolve("./db/LSPD")).filter(file => file.endsWith(".json") && file !== "000000000000000001.json");
100-
else if (bot.LEA.g.LSCSO.includes(i.guild.id)) db = fs.readdirSync(path.resolve("./db/LSCSO")).filter(file => file.endsWith(".json") && file !== "000000000000000001.json");
100+
else if (bot.LEA.g.LSSD.includes(i.guild.id)) db = fs.readdirSync(path.resolve("./db/LSSD")).filter(file => file.endsWith(".json") && file !== "000000000000000001.json");
101101
for (const file of db) {
102102
let worker;
103103
if (bot.LEA.g.LSPD.includes(i.guild.id)) worker = JSON.parse(fs.readFileSync((path.resolve("./db/LSPD") + "/" + file), "utf-8"));
104-
else if (bot.LEA.g.LSCSO.includes(i.guild.id)) worker = JSON.parse(fs.readFileSync((path.resolve("./db/LSCSO") + "/" + file), "utf-8"));
104+
else if (bot.LEA.g.LSSD.includes(i.guild.id)) worker = JSON.parse(fs.readFileSync((path.resolve("./db/LSSD") + "/" + file), "utf-8"));
105105

106106
let m;
107107
try {

src/commands/menu.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default async function run(bot, i) {
6868
name: `Info`, inline: false,
6969
value:
7070
`> **Autor:** <@411436203330502658> ([web](https://petyxbron.cz/cs/p))
71-
> **Sloužím:** LSPD ${bot.LEA.e.LSPD} a LSCSO ${bot.LEA.e.LSCSO}
71+
> **Sloužím:** LSPD ${bot.LEA.e.LSPD} a LSSD ${bot.LEA.e.LSSD}
7272
> **FiveM:** RefreshRP by Nolimit 🌴
7373
> **GitHub**: [petyxbron.cz/lea-bot](https://petyxbron.cz/lea-bot)`
7474
},
@@ -87,7 +87,7 @@ export default async function run(bot, i) {
8787
if (i.guild) {
8888
let group;
8989
if (bot.LEA.g.LSPD.includes(i.guild.id)) group = "**LSPD** " + bot.LEA.e.LSPD;
90-
else if (bot.LEA.g.LSCSO.includes(i.guild.id)) group = "**LSCSO** " + bot.LEA.e.LSCSO;
90+
else if (bot.LEA.g.LSSD.includes(i.guild.id)) group = "**LSSD** " + bot.LEA.e.LSSD;
9191
else group = false;
9292

9393
if (group) helpEmbed.setDescription(`> ✅ Server **${i.guild.name}** je součástí sboru ${group}`);

src/commands/profil.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default async function run(bot, i) {
4444
}
4545
if (!found) {
4646
db = fs.readdirSync(path.resolve("./db/LSPD")).filter(file => file.endsWith(".json") && file !== "000000000000000001.json");
47-
db = db.concat(fs.readdirSync(path.resolve("./db/LSCSO")).filter(file => file.endsWith(".json") && file !== "000000000000000001.json"));
47+
db = db.concat(fs.readdirSync(path.resolve("./db/LSSD")).filter(file => file.endsWith(".json") && file !== "000000000000000001.json"));
4848
for (const log of db) {
4949
const gotDB = getDB(log.split(".")[0]);
5050
if (!gotDB.exists) continue;

src/commands/u_DBpovýšit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async function run(bot, i) {
1919
if (admin.id === "411436203330502658") passed = true; //PetyXbron / b1ngo
2020
if (bot.LEA.g.LSPD.includes(i.guild.id) && !passed) {
2121
if (admin.roles.cache.has("1267541873451339806")) passed = true; //Leadership
22-
} else if (bot.LEA.g.LSCSO.includes(i.guild.id) && !passed) {
22+
} else if (bot.LEA.g.LSSD.includes(i.guild.id) && !passed) {
2323
if (admin.roles.cache.has("1139267137651884072")) passed = true; //Leadership
2424
if (admin.roles.cache.has("1139295201282764882")) passed = true; //FTO Commander
2525
}

src/commands/u_DBregistrovat.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async function run(bot, i) {
1919
if (admin.id === "411436203330502658") passed = true; //PetyXbron / b1ngo
2020
if (bot.LEA.g.LSPD.includes(i.guild.id) && !passed) {
2121
if (admin.roles.cache.has("1267541873451339806")) passed = true; //Leadership
22-
} else if (bot.LEA.g.LSCSO.includes(i.guild.id) && !passed) {
22+
} else if (bot.LEA.g.LSSD.includes(i.guild.id) && !passed) {
2323
if (admin.roles.cache.has("1139267137651884072")) passed = true; //Leadership
2424
if (admin.roles.cache.has("1139295201282764882")) passed = true; //FTO Commander
2525
}

src/commands/u_DBsmazat.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async function run(bot, i) {
1919
if (admin.id === "411436203330502658") passed = true; //PetyXbron / b1ngo
2020
if (bot.LEA.g.LSPD.includes(i.guild.id) && !passed) {
2121
if (admin.roles.cache.has("1267541873451339806")) passed = true; //Leadership
22-
} else if (bot.LEA.g.LSCSO.includes(i.guild.id) && !passed) {
22+
} else if (bot.LEA.g.LSSD.includes(i.guild.id) && !passed) {
2323
if (admin.roles.cache.has("1139267137651884072")) passed = true; //Leadership
2424
if (admin.roles.cache.has("1139295201282764882")) passed = true; //FTO Commander
2525
}
@@ -30,7 +30,7 @@ export default async function run(bot, i) {
3030

3131
let loc, worker, workerGuildID;
3232
if (bot.LEA.g.LSPD.includes(i.guild.id)) loc = path.resolve("./db/LSPD") + "/" + user.id + ".json";
33-
else if (bot.LEA.g.LSCSO.includes(i.guild.id)) loc = path.resolve("./db/LSCSO") + "/" + user.id + ".json";
33+
else if (bot.LEA.g.LSSD.includes(i.guild.id)) loc = path.resolve("./db/LSSD") + "/" + user.id + ".json";
3434
else return i.reply({ content: "> 🛑 **Tenhle server není uveden a seznamu.**\nKontaktuj majitele (viz. </menu:1170376396678377596>).", ephemeral: true });
3535

3636
const admins = [
@@ -61,11 +61,11 @@ export default async function run(bot, i) {
6161

6262
collector.on('collect', async c => {
6363
if (bot.LEA.g.LSPD.includes(c.guild.id))
64-
loc = path.resolve("./db/LSCSO") + "/" + user.id + ".json", worker = JSON.parse(fs.readFileSync(loc, "utf-8")),
64+
loc = path.resolve("./db/LSSD") + "/" + user.id + ".json", worker = JSON.parse(fs.readFileSync(loc, "utf-8")),
6565
workerGuildID = bot.LEA.g.LSPD[0];
66-
else if (bot.LEA.g.LSCSO.includes(c.guild.id))
66+
else if (bot.LEA.g.LSSD.includes(c.guild.id))
6767
loc = path.resolve("./db/LSPD") + "/" + user.id + ".json", worker = JSON.parse(fs.readFileSync(loc, "utf-8")),
68-
workerGuildID = bot.LEA.g.LSCSO[0];
68+
workerGuildID = bot.LEA.g.LSSD[0];
6969

7070
i.editReply({ content: `**Tenhle záznam (<@${user.id}>) byl vymazán z DB!**\n-# *Pozor, bot neodebral role!*`, files: [loc], components: [] });
7171

src/commands/u_DBupravit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async function run(bot, i) {
1919
if (admin.id === "411436203330502658") passed = true; //PetyXbron / b1ngo
2020
if (bot.LEA.g.LSPD.includes(i.guild.id) && !passed) {
2121
if (admin.roles.cache.has("1267541873451339806")) passed = true; //Leadership
22-
} else if (bot.LEA.g.LSCSO.includes(i.guild.id) && !passed) {
22+
} else if (bot.LEA.g.LSSD.includes(i.guild.id) && !passed) {
2323
if (admin.roles.cache.has("1139267137651884072")) passed = true; //Leadership
2424
if (admin.roles.cache.has("1139295201282764882")) passed = true; //FTO Commander
2525
}

0 commit comments

Comments
 (0)