Merge pull request #70 from night0721/main

.
This commit is contained in:
Night Kaly 2022-07-29 20:12:22 +01:00 committed by GitHub
commit 753f9a1284
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 126 additions and 35 deletions

View file

@ -3,7 +3,7 @@ module.exports = {
name: "kick",
description: "Kick an user",
UserPerms: ["KICK_MEMBERS"],
BotPems: ["KICK_MEMBERS"],
BotPerms: ["KICK_MEMBERS"],
usage: "(User) {Reason}",
category: "Moderation",
options: [

View file

@ -3,23 +3,15 @@
"Bangalore",
"Bloodhound",
"Caustic",
"Crypto",
"Fuse",
"Gibraltar",
"Horizon",
"LIfeline",
"Loba",
"Mirage",
"Octane",
"Pathfinder",
"Rampart",
"Revenant",
"Valkyrie",
"Watton",
"Wraith"
"Wraith",
"Fade"
],
"guns": [
"Bocek Bow",
"EVA-8",
"Kraber",
"Peacekeeper",
@ -42,7 +34,6 @@
"Longbow",
"L-Star",
"RE-45",
"30-30 Repeater",
"Mozambique",
"P2020"
]

24
data/APEX/legends.json Normal file
View file

@ -0,0 +1,24 @@
{
"Banglore": [
{
"legend_image": "https://media.discordapp.net/attachments/973918659007377408/973918831443574834/unknown.png?width=548&height=613",
"intro": "https://youtu.be/JyJhFYNob30",
"wiki": "https://apexlegends.fandom.com/wiki/Bangalore",
"codename": "Professional Soldier",
"type": "offensive",
"avalable": true,
"tactical": "Smoke Launcher",
"tactical_description": "Fire a high-velocity smoke canister that explodes into a smoke wall on impact.",
"tactical_cooldown": 33,
"tactical_link": "https://apexlegends.fandom.com/wiki/Bangalore#Smoke_Launcher",
"passive": " Double Time",
"passive_description": "Taking fire while sprinting makes you move faster for a brief time.",
"passive_link": "https://apexlegends.fandom.com/wiki/Bangalore#Double_Time",
"ultimate": "Rolling Thunder",
"ultimate_description": "Call in an artillery strike that slowly creeps across the landscape.",
"ultimate_chargetime": 180,
"ultimate_link": "https://apexlegends.fandom.com/wiki/Bangalore#Rolling_Thunder"
}
],
"Bloodhound": ""
}

View file

@ -1104,6 +1104,52 @@
]
}
],
"Oden": [
{
"muzzle": [
"Tactical Suppressor",
"OWC Light Suppressor",
"RTC Huge Suppressor",
"Monolithic Suppressor",
"OWC Light Compensator",
"MIP Light FLash Guard",
"RTC Light Muzzle Brake"
],
"barrel": ["MIP Light Barrel (Short)", "OWC Marksman", "OWC Ranger"],
"optic": [
"Red Dot Sight",
"Holographic Sight",
"3x Tactical Scope",
"4x Tactical Scope",
"4.4x Tactical Scope"
],
"stock": ["YKM Light Stock", "YKM Combat Stock", "RTC Steady Stock"],
"perk": [
"Tough",
"FMJ",
"Sleight of Hand",
"Long Shot",
"Melee Master",
"Wounding",
"Full Ammo",
"Disable"
],
"laser": ["RTC Laser 1mW", "MIP Laser 5mW", "OWC Laser - Tactical"],
"underbarrel": [
"Strike Foregrip",
"Merc Foregrip",
"Operator Foregrip",
"Ranger Foregrip",
"Tactical Foregrip A"
],
"ammo": ["Extended Mag A", "Large Extended Mag B", "Damage Mag", "12.7 mm Duplex Rounds"],
"rear_grip": [
"Stippled Grip Tape",
"Granulated Grip Tape",
"Ruberized Grip Tape"
]
}
],
"XPR_50": [
{
"muzzle": [
@ -1475,6 +1521,37 @@
"ammo": ["15 Round Extended Mag", "20 Round Extended Mag"]
}
],
"Koshka": [
{
"muzzle": [
"Tactical Suppressor",
"OWC Light Suppressor",
"Monolithic Suppressor",
"MIP Light FLash Guard",
"RTC Light Muzzle Brake"
],
"barrel": ["Enhanced Barrel", "MIP Light Barrel (Short)"],
"optic": ["3x Tactical Scope", "4x Tactical Scope", "6x Tactical Scope"],
"stock": ["Mobility Stock", "OWC Skeleton Stock", "RTC Steady Stock"],
"perk": [
"FMJ",
"Sleight of Hand",
"Wounding",
"Full Ammo",
"Disable",
"Bullet Return",
"Headshot Slow"
],
"laser": ["OWC Laser - Tactical", "Fast Aim Laser"],
"underbarrel": ["Bipod"],
"ammo": ["10 Round Extended Mag", "8 Round Fast Mag", "Armour Piercer Mag"],
"rear_grip": [
"Stippled Grip Tape",
"Granulated Grip Tape",
"Ruberized Grip Tape"
]
}
],
"S36": [
{
"muzzle": [

45
util/dist/handler.js vendored
View file

@ -29,28 +29,27 @@ module.exports = async client => {
});
client.on("ready", async () => {
await client.guilds.cache.get("840225563193114624").commands.set(ownercmds);
await client.application.commands
.set(cmds)
.then(async cmd => {
client.guilds.cache.forEach(g => {
const getroles = name => {
const perms = cmds.find(n => n.name == name).UserPerms;
if (!perms) return null;
return g.roles.cache.filter(
z => z.permissions.has(perms) && !z.managed
);
};
const fullPermissions = cmd.reduce((accumulator, v) => {
const roles = getroles(v.name);
if (!roles) return accumulator;
const permissions = roles.reduce((a, w) => {
return [...a, { id: w.id, type: "ROLE", permission: true }];
}, []);
return [...accumulator, { id: v.id, permissions }];
}, []);
g.commands.permissions.set({ fullPermissions }).catch(null);
});
})
.catch(null);
await client.application.commands.set(cmds);
// .then(async cmd => {
// client.guilds.cache.forEach(g => {
// const getroles = name => {
// const perms = cmds.find(n => n.name == name).UserPerms;
// if (!perms) return null;
// return g.roles.cache.filter(
// z => z.permissions.has(perms) && !z.managed
// );
// };
// const fullPermissions = cmd.reduce((accumulator, v) => {
// const roles = getroles(v.name);
// if (!roles) return accumulator;
// const permissions = roles.reduce((a, w) => {
// return [...a, { id: w.id, type: "ROLE", permission: true }];
// }, []);
// return [...accumulator, { id: v.id, permissions }];
// }, []);
// g.commands.permissions.set({ fullPermissions }).catch(null);
// });
// })
// .catch(null);
});
};