watermark and build command[thunder merge pls]

This commit is contained in:
night0721 2022-01-22 20:42:27 +08:00
parent 1098b97060
commit 8e1651e4bf
2 changed files with 30 additions and 6 deletions

View file

@ -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",

View file

@ -10,7 +10,6 @@ module.exports = {
description: "Link of photo",
required: true,
},
{
type: 3,
name: "position",
@ -27,6 +26,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",
@ -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] });