diff --git a/server/bot/client.ts b/server/bot/client.ts index c1bc558..d3dd8f6 100644 --- a/server/bot/client.ts +++ b/server/bot/client.ts @@ -263,6 +263,7 @@ export default class CommandParser { async onMessageUpdate (message: Message, oldMessage?: Message) { // We won't bother with a lot of messages.. if (message.content && !message.content.startsWith('/')) return + else if (!message.editedTimestamp) return else if (this.evaluatedMessages.includes(message.id)) return else if (!oldMessage || Date.now() - message.timestamp > 30000) return else if (message.editedTimestamp - message.timestamp > 30000) return diff --git a/server/bot/commands/utilities.ts b/server/bot/commands/utilities.ts index 8d12119..e196ce6 100644 --- a/server/bot/commands/utilities.ts +++ b/server/bot/commands/utilities.ts @@ -105,6 +105,7 @@ export const handleUserinfo: Command = { if (!user) return { content: `Specify a valid member of this guild, ${getInsult()}.`, error: true } // Display information. const member = message.member.guild.members.get(user.id) + // TODO: Add publicFlags, game and premiumSince. const color = member ? (member.roles.map(i => member.guild.roles.get(i)).sort( (a, b) => a.position > b.position ? -1 : 1 ).find(i => i.color !== 0) || { color: 0 }).color : 0 @@ -113,14 +114,12 @@ export const handleUserinfo: Command = { embed: { author: { name: `User info`, icon_url: user.avatarURL }, title: `${user.username}#${user.discriminator}` + (user.bot ? ' (Bot account)' : ''), - description: user.mention, + description: user.mention + (member && member.pending ? ' (pending guild screening)' : ''), thumbnail: { url: user.dynamicAvatarURL('png', 2048) }, color, fields: [ { name: 'Status', value: member && member.status ? member.status : 'N/A', inline: true }, // { name: 'Join Position } - // { name: 'Name', value: user.username, inline: true }, - // { name: 'Discriminator', value: user.discriminator, inline: true }, { name: 'Joined server at', value: member ? moment(member.joinedAt).format('DD/MM/YYYY, hh:mm:ss A') : 'N/A', @@ -131,6 +130,9 @@ export const handleUserinfo: Command = { value: moment(user.createdAt).format('DD/MM/YYYY, hh:mm:ss A'), inline: true }, + // Game... + // Badges... + // Boosting since.. { name: `Roles (${member ? member.roles.length : 'N/A'})`, value: member ? member.roles.map(i => member.guild.roles.get(i)).sort(