summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-24 19:29:25 -0700
committer8cy <[email protected]>2020-04-24 19:29:25 -0700
commit95477dd346b0f2dca1b6ced6946f5cc3cfda6697 (patch)
treebbb02c892bdc3893e8aa4ed66afc04ecc00437bb /src
parentshift groups around, new mod cmds, v7.5.0 (diff)
downloaddep-core-95477dd346b0f2dca1b6ced6946f5cc3cfda6697.tar.xz
dep-core-95477dd346b0f2dca1b6ced6946f5cc3cfda6697.zip
big changes, too lazy to count, v7.6.0
mainly just fix darling
Diffstat (limited to 'src')
-rw-r--r--src/bot.ts3
-rw-r--r--src/commands/fun/8ball.ts51
-rw-r--r--src/commands/fun/hello.ts21
-rw-r--r--src/commands/fun/howify.ts1
-rw-r--r--src/commands/user/nickname.ts30
-rw-r--r--src/commands/user/pfp.ts (renamed from src/commands/server/pfp.ts)8
-rw-r--r--src/commands/voice/join.ts31
-rw-r--r--src/commands/zerotwo/darling.ts79
-rw-r--r--src/commands/zerotwo/douse.ts25
-rw-r--r--src/config.json2
10 files changed, 191 insertions, 60 deletions
diff --git a/src/bot.ts b/src/bot.ts
index d23c625..8036f07 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -37,7 +37,8 @@ client.registry
['anime', 'Anime Command Group'],
['crypto', 'Crypto Command Group'],
['zerotwo', 'Zero Two Command Group'],
- ['bot', 'Bot COmmand Group']
+ ['bot', 'Bot COmmand Group'],
+ ['user', 'User Command Group']
])
.registerDefaultGroups()
.registerDefaultCommands({
diff --git a/src/commands/fun/8ball.ts b/src/commands/fun/8ball.ts
index 2ba8fc4..5fc6ad7 100644
--- a/src/commands/fun/8ball.ts
+++ b/src/commands/fun/8ball.ts
@@ -1,5 +1,6 @@
import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
+import emoji from 'emoji-random'
module.exports = class EightBallFun extends Command {
constructor(client) {
@@ -19,18 +20,56 @@ module.exports = class EightBallFun extends Command {
usages: 5,
duration: 30
},
- examples: ['uwu!8ball', 'uwu!8b'],
+ examples: ['uwu!8ball', 'uwu!8b 002'],
userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
- clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ args: [
+ {
+ key: 'bType',
+ prompt: 'What type of 8ball would you like?',
+ type: 'string',
+ default: ''
+ }
+ ]
});
}
- run(msg: CommandoMessage) {
- var r = ['yes~ uwu', 'no.', 'yes!', 'no!', 'what, no.', 'yes.', 'maybe.', 'perhaps.', 'try again.', 'I\'m not sure.'];
+ run(msg: CommandoMessage, { bType }) {
+ if (bType == 'darling' || bType == '002' || bType == 'zero two' || bType == 'zero-two') {
+ var r = [
+ 'Maybe, darling.',
+ 'Certainly not, darling.',
+ 'I hope so, darling.',
+ 'Not in our wildest dreams, darling.',
+ 'There is a good chance, darling.',
+ 'Quite likely, darling.',
+ 'I think so, darling.',
+ 'I hope not, darling.',
+ 'I hope so, darling.',
+ 'Never!',
+ 'Ahaha! Really?!? XD',
+ 'Hell, yes.',
+ 'Hell to the no.',
+ 'The future is bleak, darling',
+ 'The future is uncertain, darling',
+ 'I would rather not say, darling',
+ 'Who cares?',
+ 'Possibly, darling',
+ 'Never, ever, ever... ever.',
+ 'There is a small chance, darling.',
+ 'Yes, darling!'
+ ]
+ } else if (bType) {
+ msg.reply('Arguments? Try `uwu!8ball 002`. ' + emoji.random())
+ var r = ['yes~ uwu', 'no.', 'yes!', 'no!', 'what, no.', 'yes.', 'maybe.', 'perhaps.', 'try again.', 'I\'m not sure.'];
+ } else {
+ var r = ['yes~ uwu', 'no.', 'yes!', 'no!', 'what, no.', 'yes.', 'maybe.', 'perhaps.', 'try again.', 'I\'m not sure.'];
+ }
+
var s = r[Math.floor(Math.random() * r.length)];
let embed = new MessageEmbed()
- .setAuthor('The 8-ball says', 'https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/8-Ball_Pool.svg/500px-8-Ball_Pool.svg.png')
- .setDescription('`' + s + '`');
+ .setAuthor('The 8-ball says', 'https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/8-Ball_Pool.svg/500px-8-Ball_Pool.svg.png')
+ .setDescription('`' + s + '`');
msg.channel.send(embed);
}
diff --git a/src/commands/fun/hello.ts b/src/commands/fun/hello.ts
new file mode 100644
index 0000000..e4d06f3
--- /dev/null
+++ b/src/commands/fun/hello.ts
@@ -0,0 +1,21 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import emoji from 'emoji-random';
+
+module.exports = class HelloFun extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'hello',
+ aliases: ['hey', 'hi'],
+ group: 'fun',
+ memberName: 'hello',
+ description: 'Say hello to uwufier!',
+ guildOnly: true,
+ examples: ['uwu!hello', 'uwu!hey', 'uwu!hi'],
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
+ });
+ }
+ run(msg: CommandoMessage) {
+ msg.reply('Hi! ' + emoji.random())
+ }
+}; \ No newline at end of file
diff --git a/src/commands/fun/howify.ts b/src/commands/fun/howify.ts
index e7e7eb6..6529975 100644
--- a/src/commands/fun/howify.ts
+++ b/src/commands/fun/howify.ts
@@ -20,6 +20,7 @@ module.exports = class HowifyFun extends Command {
// fs.unlinkSync('../../../node_modules/howifier/images/blissgay.jpeg')
msg.attachments.forEach(async attachment => {
var u1 = await how(attachment.url);
+ msg.delete()
setTimeout(() => {
msg.say({ files: [u1] })
}, 2000);
diff --git a/src/commands/user/nickname.ts b/src/commands/user/nickname.ts
new file mode 100644
index 0000000..ffc8d18
--- /dev/null
+++ b/src/commands/user/nickname.ts
@@ -0,0 +1,30 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import emoji from 'emoji-random';
+
+module.exports = class NickNameUser extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'nickname',
+ aliases: ['nick', 'name'],
+ group: 'user',
+ memberName: 'nickname',
+ description: 'Allows you to change your nickname in the current server.',
+ args: [
+ {
+ key: 'userNick',
+ prompt: 'What would you like to change your nickname to?',
+ type: 'string'
+ }
+ ],
+ examples: [
+ 'uwu!nickname sinny',
+ 'uwu!nick s1nical',
+ 'uwu!name s1n'
+ ]
+ });
+ }
+ run(msg: CommandoMessage, { userNick }) {
+ msg.member.setNickname(userNick)
+ msg.reply(`Your nickname has been changed to ${userNick}. ` + emoji.random())
+ }
+}; \ No newline at end of file
diff --git a/src/commands/server/pfp.ts b/src/commands/user/pfp.ts
index 6d7ce73..bf593fa 100644
--- a/src/commands/server/pfp.ts
+++ b/src/commands/user/pfp.ts
@@ -1,4 +1,6 @@
import { Command, CommandoMessage } from 'discord.js-commando';
+import { MessageEmbed } from 'discord.js';
+import emoji from 'emoji-random';
module.exports = class PFPServer extends Command {
constructor(client) {
@@ -21,7 +23,11 @@ module.exports = class PFPServer extends Command {
run(msg: CommandoMessage, { userID } ) {
userID = msg.mentions.users.first()?.id;
this.client.users.fetch(userID).then(user => {
- msg.reply({ files: [user.avatarURL()] })
+ let emb = new MessageEmbed()
+ .setColor(0xFFCC4D)
+ .setTitle(`${msg.mentions.users.first()?.username}'s Profile Picture ` + emoji.random())
+ .setImage(user.avatarURL())
+ msg.reply(emb)
})
}
}; \ No newline at end of file
diff --git a/src/commands/voice/join.ts b/src/commands/voice/join.ts
deleted file mode 100644
index 9633e14..0000000
--- a/src/commands/voice/join.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
-import emoji from 'emoji-random';
-
-module.exports = class JoinVoice extends Command {
- constructor(client) {
- super(client, {
- name: 'join',
- group: 'voice',
- memberName: 'join',
- description: 'Joins your current voice channel. (kinda broken, if you use this command, you won\'t be able to use uwu!leave.)',
- throttling: {
- usages: 2,
- duration: 5
- },
- guildOnly: true,
- examples: ['uwu!join'],
- clientPermissions: ['SPEAK', 'CONNECT', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
- userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
- });
- }
- run(msg: CommandoMessage) {
- if (msg.guild.musicData.isPlaying == false && msg.member.voice.channel) {
- msg.member.voice.channel.join();
- msg.reply('Succesfully joined voice channel. ' + emoji.random());
- } else if (msg.guild.musicData.isPlaying == false) {
- msg.reply('I\'m already in voice channel. ' + emoji.random());
- } else if (!msg.member.voice.channel) {
- msg.reply('Please join a channel and try again. ' + emoji.random());
- }
- }
-}; \ No newline at end of file
diff --git a/src/commands/zerotwo/darling.ts b/src/commands/zerotwo/darling.ts
index 3b7517e..9999362 100644
--- a/src/commands/zerotwo/darling.ts
+++ b/src/commands/zerotwo/darling.ts
@@ -1,4 +1,5 @@
import { Command, CommandoMessage } from 'discord.js-commando';
+import emoji from 'emoji-random';
import Darling from '../../models/darling.js';
import mongo from 'mongoose';
mongo.connect('mongodb://sin:[email protected]:47107/heroku_4qrjvmb9')
@@ -38,27 +39,65 @@ module.exports = class DarlingZeroTwo extends Command {
})
const guildExist = await Darling.findOne({ guildID: msg.guild.id })
- 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))
+ Darling.findOne({ guildID: msg.guild.id }, async (error, guild) => {
+ if (error) {
+ console.log(error)
+ } else if (guild && darlingName == 'remove') {
+ if (msg.author.id == guild.userID) {
+ await Darling.findOneAndDelete({ guildID: msg.guild.id })
+ msg.say('The current darling has been removed. ' + emoji.random())
+ } else {
+ msg.reply('Only my darling can remove the current darling. ' + emoji.random())
+ }
+ } else if (!guild && darlingName == 'remove') {
+ msg.reply('There is no darling set in this server. ' + emoji.random())
+ } else if (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
+ 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 (!guild) {
+ msg.reply('I haven\'t found my darling yet! To set one, do `uwu!darling set`. ' + emoji.random())
+ } else if (guild) {
+ msg.reply(`My darling is <@${guild.userID}>. ` + emoji.random())
}
- msg.reply(quoteResult)
- } else if (!guildExist) {
- msg.reply('I haven\'t found my darling yet!')
- } else if (guildExist) {
- let result = await Darling.findOne({ userID: msg.author.id })
- msg.reply(`My darling is <@${result.userID}>`)
- }
+ })
+
+ // 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
new file mode 100644
index 0000000..9ca74ca
--- /dev/null
+++ b/src/commands/zerotwo/douse.ts
@@ -0,0 +1,25 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import { MessageEmbed } from 'discord.js';
+
+module.exports = class DouseZeroTwo extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'douse',
+ group: 'fun',
+ memberName: 'douse',
+ description: 'Douses Zero Two.',
+ examples: [
+ 'uwu!douse'
+ ],
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ });
+ }
+ run(msg: CommandoMessage) {
+ let emb = new MessageEmbed()
+ .setColor(0xFFD0DF)
+ .setDescription('And I oop-')
+ .setImage('https://i.pinimg.com/originals/6a/c8/26/6ac826e3d0cbd64eb4f42c12a73fcdb8.gif')
+ msg.say(emb)
+ }
+}; \ No newline at end of file
diff --git a/src/config.json b/src/config.json
index 57d6d07..cc997d9 100644
--- a/src/config.json
+++ b/src/config.json
@@ -1,5 +1,5 @@
{
"secret":"Njk5NDczMjYzOTk4MjcxNDg5.XpU5oQ.btZuxVudhNllSQY6CxrXXtMJm9A",
"yt-api-key":"AIzaSyCeG1lQAeInv4vjFv_eTL9IFAFNdQC9Nk8",
- "version":"7.5.0"
+ "version":"7.6.0"
} \ No newline at end of file