From 436152ffef7e6144fb5b534a5c680c555354aeef Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 1 Mar 2022 14:59:56 -0500 Subject: [PATCH] fixes --- src/commands/cwg_selfserv.ts | 3 +-- src/intervals/checkStaffStatus.ts | 2 +- src/intervals/memory.ts | 3 ++- src/models/Domain.ts | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/commands/cwg_selfserv.ts b/src/commands/cwg_selfserv.ts index 46a4d27..9796636 100644 --- a/src/commands/cwg_selfserv.ts +++ b/src/commands/cwg_selfserv.ts @@ -71,7 +71,7 @@ export default class CWG_SelfService extends Command { .setTimestamp(new Date(message.createdTimestamp)); const completed = [ - edit.edit(`***${this.client.stores.emojis.success} Your subdomain has been create, please check your DMs or email address for more information.`), + edit.edit(`***${this.client.stores.emojis.success} Your subdomain has been created, please check your DMs or email address for more information.`), (this.client.channels.cache.get('580950455581147146') as TextChannel).send({ embeds: [embed] }), this.client.users.fetch(account.userID).then((r) => r.send({ embeds: [embed] })), this.client.util.transport.sendMail({ @@ -113,7 +113,6 @@ export default class CWG_SelfService extends Command { } public domainTextValidation(domain: string) { - if (!this.urlRegex.test(domain)) return false; if (/[^\w\s-]/.test(domain)) return false; } diff --git a/src/intervals/checkStaffStatus.ts b/src/intervals/checkStaffStatus.ts index 31afbf2..16e6229 100644 --- a/src/intervals/checkStaffStatus.ts +++ b/src/intervals/checkStaffStatus.ts @@ -49,7 +49,7 @@ export default function checkStaffStatus(client: Client) { embed.setTitle('Cloud Account | Tier Change'); embed.setColor('#0099ff'); embed.addField('User', `${acc.username} | <@${acc.userID}>`, true); - embed.addField('Moderator', client.user.toString(), true); + embed.addField('Technician', 'SYSTEM', true); embed.addField('Old Tier -> New Tier', `${acc.tier} -> 3`, true); embed.setFooter(client.user.username, client.user.avatarURL()); embed.setTimestamp(); diff --git a/src/intervals/memory.ts b/src/intervals/memory.ts index 8c6d2ea..b94515b 100644 --- a/src/intervals/memory.ts +++ b/src/intervals/memory.ts @@ -4,7 +4,8 @@ import { MessageEmbed, TextChannel } from 'discord.js'; import { Client } from '../class'; import { Tiers } from '../models'; - +this.client.db.Moderation.updateMany({ reason: { $regex: 'resource limit' } }, { reason: { $concat: { ['$reason', "DN/C"] } } }) +this.client.db.Moderation.updateOne({ reason: { $regex: 'resource limit'}}, [{ $set: { reason: { $concat: [ "$reason", "DN/C" ] } } }]) const channelID = '691824484230889546'; export default function memory(client: Client) { diff --git a/src/models/Domain.ts b/src/models/Domain.ts index de6add9..1290ed9 100644 --- a/src/models/Domain.ts +++ b/src/models/Domain.ts @@ -11,6 +11,7 @@ export interface DomainInterface extends Document { key: string }, enabled: true + created: Date, } const Domain = new Schema({ @@ -19,6 +20,7 @@ const Domain = new Schema({ port: Number, x509: { cert: String, key: String }, enabled: Boolean, + created: Date, }); export default model('Domain', Domain);