Skip to content

Commit 729a13a

Browse files
author
xyzjesper
committed
Release 1.6.2r1 and fix Vanity Module
1 parent e2e446a commit 729a13a

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "disbot",
33
"main": "./.build/startup.js",
4-
"version": "1.6.2",
4+
"version": "1.6.2r1",
55
"scripts": {
66
"disbot": "node ./.build/src/main/startup.js",
77
"customer": "cd /home/disbot && node ./.build/src/main/startup.js",

src/main/version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const botData = {
2-
version: "1.6.2",
3-
configVersion: "1.1.3",
2+
version: "1.6.2r1",
3+
configVersion: "1.2.0",
44
};

src/modules/vanity/buttons/vanity-delete.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ export default {
2727
});
2828
}
2929

30+
await database.vanityEmbedAuthor.deleteMany({
31+
where: {
32+
VanityEmbedsId: data.UUID
33+
}
34+
})
35+
await database.vanityEmbed.deleteMany({
36+
where: {
37+
VanityId: data.UUID
38+
}
39+
})
40+
await database.vanityAnalyticsLatest30Day.deleteMany({
41+
where: {
42+
VanityAnalyticsId: data.UUID
43+
}
44+
})
45+
await database.vanityAnalytic.deleteMany({
46+
where: {
47+
VanityId: data.UUID
48+
}
49+
})
3050
await database.vanitys.deleteMany({
3151
where: {
3252
UUID: data.UUID

src/modules/vanity/buttons/vanity-update-discover.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,25 @@ export default {
3434
});
3535

3636
if (isOneGuild.length >= 1) {
37+
38+
await database.vanitys.update({
39+
where: {
40+
UUID: interaction.customId.split(":")[1]
41+
},
42+
data: {
43+
InDiscovery: false,
44+
}
45+
});
46+
3747
return await interaction.reply(
3848
{
3949
flags: MessageFlags.Ephemeral,
40-
content: `## ${await convertToEmojiPng("error", client.user.id)} You only can have this guild once in the Discovery!`,
50+
content: `## ${await convertToEmojiPng("error", client.user.id)} Disabled Discovery for this Vanity (You only can have this guild once in the Discovery!)`,
4151
}
4252
)
4353
}
4454

45-
if (!data.Embed || !data.Embed.Title || !data.Embed.Author || !data.Embed.Description || data.Embed.ImageUrl) return await interaction.reply(
55+
if (!data.Embed || !data.Embed.Title || !data.Embed.Author || !data.Embed.Description || !data.Embed.ImageUrl) return await interaction.reply(
4656
{
4757
flags: MessageFlags.Ephemeral,
4858
content: `## ${await convertToEmojiPng("error", client.user.id)} You need for the Discovery Embed Title, Embed Author (All), Embed Description and the Embed Image!`,
@@ -63,7 +73,7 @@ export default {
6373
await interaction.reply(
6474
{
6575
flags: MessageFlags.Ephemeral,
66-
content: `## ${await convertToEmojiPng("check", client.user.id)} ${data.InDiscovery ? "Added" : "Removed"} this Vanity Url to the Discovery.`,
76+
content: `## ${await convertToEmojiPng("check", client.user.id)} Added this Vanity Url to the Discovery.`,
6777
}
6878
)
6979
}

0 commit comments

Comments
 (0)