From bb511abc03bb66848947e37a999502b813c77269 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Thu, 23 Jul 2020 23:24:17 -0700 Subject: goodbye old uwufier :cry: --- src/commands/zerotwo/darling.ts | 116 ---------------------------------------- src/commands/zerotwo/douse.ts | 28 ---------- src/commands/zerotwo/zerotwo.ts | 26 --------- 3 files changed, 170 deletions(-) delete mode 100644 src/commands/zerotwo/darling.ts delete mode 100644 src/commands/zerotwo/douse.ts delete mode 100644 src/commands/zerotwo/zerotwo.ts (limited to 'src/commands/zerotwo') diff --git a/src/commands/zerotwo/darling.ts b/src/commands/zerotwo/darling.ts deleted file mode 100644 index 2f52ed4..0000000 --- a/src/commands/zerotwo/darling.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -//@ts-ignore no @types -import emoji from 'emoji-random'; -import Darling from '../../models/darling.js'; -import mongo from 'mongoose'; -import config from '../../config.json'; -mongo.connect(config['mongodburi'], { useNewUrlParser: true, useUnifiedTopology: true }) - -module.exports = class DarlingZeroTwo extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'darling', - group: 'zerotwo', - memberName: 'darling', - description: 'Allows you to set, change or delete uwufier\'s darling.', - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - examples: [ - 'uwu!darling', - 'uwu!darling set', - 'uwu!darling remove' - ], - args: [ - { - key: 'darlingName', - prompt: 'Who should the darling be?', - type: 'string', - default: '' - } - ], - throttling: { - usages: 5, - duration: 30 - }, - guildOnly: true - }); - } - //TODO: this - //@ts-ignore this is not asnc - async run(msg: CommandoMessage, { darlingName }: any) { // this is actually a string - const darling = new Darling({ - _id: mongo.Types.ObjectId(), - username: msg.author.username, - userID: msg.author.id, - guildname: msg.guild.name, - guildID: msg.guild.id, - time: msg.createdAt - }) - // const guildExist = await Darling.findOne({ guildID: msg.guild.id }) - - Darling.findOne({ guildID: msg.guild.id }, async (error, guild) => { - if (error) { - return console.log(error) - } else if (guild && darlingName == 'remove') { - // @ts-ignore linting error shows that channelID doesnt exist when it does - if (msg.author.id == guild.userID || msg.author.id == msg.guild.owner.id) { - await Darling.findOneAndDelete({ guildID: msg.guild.id }) - return msg.say('The current darling has been removed. ' + emoji.random()) - } else { - return msg.reply('Only my darling or the guild owner can remove the current darling. ' + emoji.random()) - } - } else if (!guild && darlingName == 'remove') { - return msg.reply('There is no darling set in this server. ' + emoji.random()) - } else if (guild && darlingName == 'set') { - // @ts-ignore linting error shows that channelID doesnt exist when it does - return msg.reply(`I already have a darling! It\'s <@${guild.userID}>! To set a new darling, either the current darling or the guild owner has to do \`uwu!darling remove\`. ` + emoji.random()) - } else if (!guild && darlingName == 'set') { - await darling.save() - .then(result => console.log(result)) - .catch(err => console.log(err)) - - const quotes = [ - 'I think I have taken a liking to you. Won\'t you be my darling?', - 'I like the look in your eyes. It makes my heart race. You are now my darling!', - 'Wow, your taste makes my heart race. It bites and lingers... The taste of danger. You are now my darling!' - ] - let quoteNum = quotes[Math.floor(Math.random() * quotes.length)] - return msg.reply(quoteNum) - } else if (!guild) { - return msg.reply('I haven\'t found my darling yet! To set one, do `uwu!darling set`. ' + emoji.random()) - } else if (guild) { - // @ts-ignore linting error shows that channelID doesnt exist when it does - return msg.reply(`My darling is <@${guild.userID}>. ` + emoji.random()) - } - }) - - // if (guildExist && darlingName == 'remove') { - // await Darling.findOneAndDelete({ guildID: msg.guild.id }) - // msg.say('The current darling has been removed.') - // } else if (!guildExist && darlingName == 'remove') { - // msg.reply('There is no darling set in this server.') - // } else if (darlingName || darlingName == 'set') { - // await darling.save().then(result => console.log(result)).catch(err => console.log(err)) - - // var quoteNum = Math.floor((Math.random() * 3) + 1); - // switch (quoteNum) { - // case 1: var quoteResult = 'I think I have taken a liking to you. Won\'t you be my darling?'; break - // case 2: var quoteResult = 'I like the look in your eyes. It makes my heart race. You are now my darling!'; break - // case 3: var quoteResult = 'Wow, your taste makes my heart race. It bites and lingers... The taste of danger. You are now my darling!'; break - // default: var quoteResult = 'I think I have taken a liking to you. Won\'t you be my darling?'; break - // } - // msg.reply(quoteResult) - // } else if (!guildExist) { - // msg.reply('I haven\'t found my darling yet!') - // } else if (guildExist) { - // await Darling.findOne({ userID: msg.author.id }, (err) => { - // if (err) console.log(err) - // }).then(res => { - // msg.reply(`My darling is <@${res.userID}>`) - // }) - // //msg.reply(`My darling is <@${result.userID}>`) - // } else { - // console.error() - // } - } -}; \ No newline at end of file diff --git a/src/commands/zerotwo/douse.ts b/src/commands/zerotwo/douse.ts deleted file mode 100644 index d9cdca3..0000000 --- a/src/commands/zerotwo/douse.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -import { MessageEmbed } from 'discord.js'; - -module.exports = class DouseZeroTwo extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'douse', - group: 'zerotwo', - memberName: 'douse', - description: 'Douses Zero Two.', - examples: [ - 'uwu!douse' - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - }); - } - run(msg: CommandoMessage) { - let emb = new MessageEmbed() - .setColor(0xFFD0DF) - .setImage('https://i.pinimg.com/originals/6a/c8/26/6ac826e3d0cbd64eb4f42c12a73fcdb8.gif') - return msg.say(emb) - } -}; \ No newline at end of file diff --git a/src/commands/zerotwo/zerotwo.ts b/src/commands/zerotwo/zerotwo.ts deleted file mode 100644 index ba9602a..0000000 --- a/src/commands/zerotwo/zerotwo.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando'; -// @ts-ignore no types -import emoji from 'emoji-random'; - -module.exports = class ZeroTwoZeroTwo extends Command { - constructor(client: CommandoClient) { - super(client, { - name: 'zerotwo', - group: 'zerotwo', - memberName: 'zerotwo', - description: 'Zero Two.', - examples: [ - 'uwu!zerotwo' - ], - userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - throttling: { - usages: 5, - duration: 30 - }, - }); - } - run(msg: CommandoMessage) { - return msg.reply(`Zero Two is the best waifu of all, literally no one else can compare. Unironically she is the best waifu of all time. Literally praise her. This is not a joke she is literally the best. ${emoji.random()}`) - } -}; \ No newline at end of file -- cgit v1.2.3