watermark command and bug fix
This commit is contained in:
parent
67df35a7a6
commit
df889fe4b9
3 changed files with 104 additions and 4 deletions
100
command/CODM/watermark.js
Normal file
100
command/CODM/watermark.js
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
const axios = require("axios");
|
||||||
|
const { MessageAttachment } = require("discord.js");
|
||||||
|
module.exports = {
|
||||||
|
name: "watermark",
|
||||||
|
description: "Add a water to leaks",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
type: 3,
|
||||||
|
name: "photo",
|
||||||
|
description: "Link of photo",
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
type: 3,
|
||||||
|
name: "position",
|
||||||
|
description: "Where you want to place the water mark",
|
||||||
|
required: true,
|
||||||
|
choices: [
|
||||||
|
{
|
||||||
|
name: "Middle",
|
||||||
|
value: "middle",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ButtomRight",
|
||||||
|
value: "buttomright",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 3,
|
||||||
|
name: "logo",
|
||||||
|
description: "The Logo you want to use",
|
||||||
|
required: true,
|
||||||
|
choices: [
|
||||||
|
{
|
||||||
|
name: "Discord Nicecat",
|
||||||
|
value: "discord_nicecat",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "NoLink Leakers",
|
||||||
|
value: "nolink_leakers",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Discord Leakers",
|
||||||
|
value: "discord_leakers",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "DogeBeanie",
|
||||||
|
value: "doge",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "CODM N3W3",
|
||||||
|
value: "n3w3",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Alyan Gaming",
|
||||||
|
value: "alyan",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Murdablast",
|
||||||
|
value: "murdablast",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Sasha",
|
||||||
|
value: "sasha",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Umair Gamer",
|
||||||
|
value: "umair",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 3,
|
||||||
|
name: "password",
|
||||||
|
description: "The password in order to use this command",
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
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]}`
|
||||||
|
)
|
||||||
|
.then(res => res.data)
|
||||||
|
.catch();
|
||||||
|
if (!data) {
|
||||||
|
interaction.followUp({
|
||||||
|
content: "You have either wrong input or you are unauthorized",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
const ima = new MessageAttachment(
|
||||||
|
`${process.env.api}/api/v1/codm/watermark?photo=${args[0]}&position=${args[1]}&logo=${args[2]}&password=${args[3]}`,
|
||||||
|
`${args[2]}.png`
|
||||||
|
);
|
||||||
|
interaction.followUp({ files: [ima] });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
|
@ -10,8 +10,8 @@ module.exports = {
|
||||||
ErrorLog: "900509758786773022",
|
ErrorLog: "900509758786773022",
|
||||||
ServerLog: "848613714537873518",
|
ServerLog: "848613714537873518",
|
||||||
Lavalink: {
|
Lavalink: {
|
||||||
Host: "lavalink.darrennathanael.com",
|
Host: "lavalink-repl.thunderemperor.repl.co",
|
||||||
Port: 2095,
|
Port: 443,
|
||||||
Password: "whatwasthelastingyousaid",
|
Password: "0638xxtXRH887UQQ",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,5 +13,5 @@ client.on("ready", async () => {
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
console.log(`${client.user.username} ✅\nVersion: v${version}`);
|
console.log(`${client.user.username} ✅`);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue