nyx

The first CODM discrod bot -- cath.exe Template
git clone https://codeberg.org/night0721/nyx
Log | Files | Refs | LICENSE

commit 8e1651e4bf00a6d34784bfaccb37e37fb1b53b83
parent 1098b97060545d43c3fc4e5faa8cf7bc46e400cc
Author: night0721 <[email protected]>
Date:   Sat, 22 Jan 2022 20:42:27 +0800

watermark and build command[thunder merge pls]

Diffstat:
Mcommand/CODM/build.js | 24+++++++++++++++++++++---
Mcommand/CODM/watermark.js | 12+++++++++---
2 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/command/CODM/build.js b/command/CODM/build.js @@ -97,7 +97,10 @@ module.exports = { { name: "Swordfish", value: "swordfish", - }, + }, // { + // name: "Kilo 141", + // value: "kilo", + // }, ], }, { @@ -113,7 +116,10 @@ module.exports = { { name: "Jokesta", value: "jokesta", - }, + }, // { + // name: "Stats On Duty", + // value: "sod", + // }, ], }, { @@ -217,6 +223,10 @@ module.exports = { name: "CBR4", value: "cbr4", }, + { + name: "PPSh 41", + value: "ppsh", + }, ], }, { @@ -391,6 +401,10 @@ module.exports = { name: "Hades", value: "hades", }, + { + name: "PKM", + value: "pkm", + }, ], }, { @@ -659,6 +673,7 @@ module.exports = { cr56amax: "CR-56 AMAX", m13: "M13", swordfish: "Swordfish", + // kilo: "Kilo 141", j358: "J358", gs50: ".50 GS", @@ -670,7 +685,7 @@ module.exports = { kiloboltaction: "Kilo Bolt-Action", sks: "SKS", spr208: "SP-R 208", - mk2: "mk2", + mk2: "MK2", s36: "S36", ul736: "UL736", @@ -679,6 +694,7 @@ module.exports = { chopper: "Chopper", holger26: "Holger 26", hades: "Hades", + pkm: "PKM", arctic50: "Arctic .50", m21ebr: "M21 EBR", @@ -715,6 +731,7 @@ module.exports = { pp19bizon: "PP19 Bizon", mx9: "MX9", cbr4: "CBR4", + ppsh: "PPSh-41", }; const all = { assault_rifle: "Assault Rifle", @@ -727,6 +744,7 @@ module.exports = { path: "Path.exe", dhitman: "dHitman", jokesta: "Jokesta", + sod: "Stats On Duty", // littleb:"Little B", aggressive: "Aggressive", diff --git a/command/CODM/watermark.js b/command/CODM/watermark.js @@ -10,7 +10,6 @@ module.exports = { description: "Link of photo", required: true, }, - { type: 3, name: "position", @@ -29,6 +28,13 @@ module.exports = { }, { type: 3, + type: "opacity", + description: + "Opacity of watermark(50 - 100) Lower or higher will be ignored", + required: true, + }, + { + type: 3, name: "logo", description: "The Logo you want to use", required: true, @@ -81,7 +87,7 @@ module.exports = { run: async (client, interaction, args) => { const data = await axios .get( - `${process.env.api}/api/v1/codm/watermark?photo=${args[0]}&position=${args[1]}&logo=${args[2]}&password=${args[3]}` + `${process.env.api}/api/v1/codm/watermark?photo=${args[0]}&position=${args[1]}&opacity=${args[2]}&logo=${args[3]}&password=${args[4]}` ) .then(res => res.data) .catch(); @@ -91,7 +97,7 @@ module.exports = { }); } else { const ima = new MessageAttachment( - `${process.env.api}/api/v1/codm/watermark?photo=${args[0]}&position=${args[1]}&logo=${args[2]}&password=${args[3]}`, + `${process.env.api}/api/v1/codm/watermark?photo=${args[0]}&position=${args[1]}&opacity=${args[2]}&logo=${args[3]}&password=${args[4]}`, `${args[2]}.png` ); interaction.followUp({ files: [ima] });