for coded
diff --git a/src/commands/mod/ban.ts b/src/commands/mod/ban.ts
index 2d7d036..92ed3a7 100644
--- a/src/commands/mod/ban.ts
+++ b/src/commands/mod/ban.ts
@@ -41,7 +41,7 @@
.setEmoji("PUNISH.BAN.RED")
.setTitle("Banned")
.setDescription(`You have been banned in ${interaction.guild.name}` +
- (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : " with no reason provided."))
+ (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : "."))
.setStatus("Danger")
]
})
diff --git a/src/commands/mod/kick.ts b/src/commands/mod/kick.ts
index 56e00e2..08beaa5 100644
--- a/src/commands/mod/kick.ts
+++ b/src/commands/mod/kick.ts
@@ -39,7 +39,7 @@
.setEmoji("PUNISH.KICK.RED")
.setTitle("Kicked")
.setDescription(`You have been kicked in ${interaction.guild.name}` +
- (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : " with no reason provided."))
+ (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : "."))
.setStatus("Danger")
]
})
diff --git a/src/commands/mod/mute.ts b/src/commands/mod/mute.ts
index 7c8cdd9..02d2531 100644
--- a/src/commands/mod/mute.ts
+++ b/src/commands/mod/mute.ts
@@ -137,7 +137,7 @@
.setEmoji("PUNISH.MUTE.RED")
.setTitle("Muted")
.setDescription(`You have been muted in ${interaction.guild.name}` +
- (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : " with no reason provided.\n\n" +
+ (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : ".\n\n" +
`You will be unmuted at: <t:${Math.round((new Date).getTime() / 1000) + muteTime}:D> at <t:${Math.round((new Date).getTime() / 1000) + muteTime}:T> (<t:${Math.round((new Date).getTime() / 1000) + muteTime}:R>)`))
.setStatus("Danger")
]
diff --git a/src/commands/mod/purge.ts b/src/commands/mod/purge.ts
index 1dc75eb..aa2f405 100644
--- a/src/commands/mod/purge.ts
+++ b/src/commands/mod/purge.ts
@@ -15,7 +15,7 @@
.setDescription("The amount of messages to delete")
.setRequired(false)
.setMinValue(1)
- .setMaxValue(50))
+ .setMaxValue(100))
.addChannelOption(option => option.setName("channel").setDescription("The channel to purge messages from").setRequired(false))
.addUserOption(option => option.setName("user").setDescription("The user to purge messages from").setRequired(false))
.addStringOption(option => option.setName("reason").setDescription("The reason for the purge").setRequired(false))
diff --git a/src/commands/mod/softban.ts b/src/commands/mod/softban.ts
index bcebbd5..233b7f2 100644
--- a/src/commands/mod/softban.ts
+++ b/src/commands/mod/softban.ts
@@ -40,7 +40,7 @@
.setEmoji("PUNISH.BAN.RED")
.setTitle("Softbanned")
.setDescription(`You have been softbanned from ${interaction.guild.name}` +
- (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : " with no reason provided."))
+ (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : "."))
.setStatus("Danger")
]
})
diff --git a/src/commands/mod/warn.ts b/src/commands/mod/warn.ts
index 442f290..3662896 100644
--- a/src/commands/mod/warn.ts
+++ b/src/commands/mod/warn.ts
@@ -16,6 +16,8 @@
)
const callback = async (interaction: CommandInteraction) => {
+ // @ts-ignore
+ const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = interaction.client.logger
// TODO:[Modals] Replace this with a modal
if (await new confirmationMessage(interaction)
.setEmoji("PUNISH.WARN.RED")
@@ -24,7 +26,8 @@
"user": `<@!${(interaction.options.getMember("user") as GuildMember).id}> (${(interaction.options.getMember("user") as GuildMember).user.username})`,
"reason": `\n> ${interaction.options.getString("reason") ? interaction.options.getString("reason") : "*No reason provided*"}`
})
- + `The user **will${interaction.options.getString("notify") === "no" ? ' not' : ''}** be notified\n\n`)
+ + `The user **will${interaction.options.getString("notify") === "no" ? ' not' : ''}** be notified\n\n`
+ + `Are you sure you want to warn <@!${(interaction.options.getMember("user") as GuildMember).id}>?`)
.setColor("Danger")
// pluralize("day", interaction.options.getInteger("delete"))
// const pluralize = (word: string, count: number) => { return count === 1 ? word : word + "s" }
@@ -37,7 +40,7 @@
.setEmoji("PUNISH.WARN.RED")
.setTitle("Warned")
.setDescription(`You have been warned in ${interaction.guild.name}` +
- (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : " with no reason provided."))
+ (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : "."))
.setStatus("Danger")
]
})
@@ -51,6 +54,25 @@
.setStatus("Danger")
], components: []})
}
+ let data = {
+ meta:{
+ type: 'memberWarn',
+ displayName: 'Member warned',
+ calculateType: 'guildMemberPunish',
+ color: NucleusColors.yellow,
+ emoji: 'PUNISH.WARN.YELLOW',
+ timestamp: new Date().getTime()
+ },
+ list: {
+ user: renderUser((interaction.options.getMember("user") as GuildMember).user.id, (interaction.options.getMember("user") as GuildMember).user),
+ warnedBy: renderUser(interaction.member.user.id, interaction.member.user),
+ reason: (interaction.options.getString("reason") ? `\n> ${interaction.options.getString("reason")}` : "No reason provided")
+ },
+ hidden: {
+ guild: interaction.guild.id
+ }
+ }
+ log(data, interaction.client);
let failed = (dmd == false && interaction.options.getString("notify") != "no")
if (!failed) {
await interaction.editReply({embeds: [new EmojiEmbed()
@@ -97,7 +119,7 @@
.setEmoji(`PUNISH.WARN.RED`)
.setTitle(`Warn`)
.setDescription(`You have been warned` +
- (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : " with no reason provided."))
+ (interaction.options.getString("reason") ? ` for:\n> ${interaction.options.getString("reason")}` : "."))
.setStatus("Danger")
],
content: `<@!${(interaction.options.getMember("user") as GuildMember).id}>`,
@@ -129,7 +151,6 @@
}
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
- return true
let member = (interaction.member as GuildMember)
let me = (interaction.guild.me as GuildMember)
let apply = (interaction.options.getMember("user") as GuildMember)