diff --git a/src/commands/profile.ts b/src/commands/profile.ts deleted file mode 100644 index 21c718e..0000000 --- a/src/commands/profile.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Message } from 'eris'; -import { Client, Command } from '../class'; - -export default class Profile extends Command { - constructor(client: Client) { - super(client); - this.name = 'profile'; - this.description = 'Manages your profile on CR'; - this.usage = 'profile '; - this.permissions = 0; - this.enabled = true; - } - - public async run(message: Message, args: string[]) { - const profile = await this.client.db.Member.findOne({ userID: message.author.id }); - if (!profile) return this.error(message.channel, 'Please try again later. We do not currently have a member profile for you.'); - if (!args[1]) return this.error(message.channel, 'No new value was provided.'); - const newValue = args.slice(1).join(' '); - if (newValue.length >= 512) return this.error(message.channel, 'Please shorten your input.'); - - switch (args[0]) { - case 'github': - await profile.updateOne({ - additional: { - ...profile.additional, - github: args[1], - }, - }); - this.success(message.channel, 'Updated GitHub.'); - break; - case 'gitlab': - await profile.updateOne({ - additional: { - ...profile.additional, - gitlab: args[1], - }, - }); - this.success(message.channel, 'Updated GitLab.'); - break; - case 'bio': - await profile.updateOne({ - additional: { - ...profile.additional, - bio: newValue, - }, - }); - this.success(message.channel, 'Updated bio.'); - break; - default: - return this.error(message.channel, 'Please specify a valid option to change.'); - } - } -} diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 2e609e0..cbd4851 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -58,17 +58,14 @@ export default class Whois extends Command { if (ackResolve?.extension) { description += `☎️ ${ackResolve.extension}\n`; } - - const memberProfile = await this.client.db.Member.findOne({ userID: message.author.id }); - - if (memberProfile?.additional?.gitlab) { - description += `${emotes.gitlab} ${memberProfile?.additional.gitlab}\n`; + if (ackResolve?.gitlab) { + description += `${emotes.gitlab} ${ackResolve?.gitlab}\n`; } - if (memberProfile?.additional?.github) { - description += `${emotes.github} ${memberProfile?.additional.github}\n`; + if (ackResolve?.github) { + description += `${emotes.github} ${ackResolve?.github}\n`; } - if (memberProfile?.additional?.bio) { - description += `${emotes.bio} *${memberProfile?.additional.bio}*\n`; + if (ackResolve?.additional?.bio) { + description += `${emotes.bio} *${ackResolve?.bio}*\n`; } description += `\n<@${member.id}>`; embed.setDescription(description); diff --git a/src/models/Member.ts b/src/models/Member.ts index 8be3c96..e7023b5 100644 --- a/src/models/Member.ts +++ b/src/models/Member.ts @@ -5,9 +5,6 @@ export interface MemberInterface extends Document { additional: { langs: ['js', 'py', 'rb', 'ts', 'rs', 'go', 'cfam', 'csharp', 'swift', 'java', 'kt', 'asm'], operatingSystems: ['arch', 'deb', 'cent', 'fedora', 'manjaro', 'mdarwin', 'redhat', 'ubuntu', 'win'], - github: string; - gitlab: string; - bio: string; }, } @@ -16,9 +13,6 @@ const Member: Schema = new Schema({ additional: { langs: Array, operatingSystems: Array, - github: String, - gitlab: String, - bio: String, }, });