diff --git a/changes.txt b/changes.txt index 529e5aa..2648987 100644 --- a/changes.txt +++ b/changes.txt @@ -7,4 +7,7 @@ added `dice`, rolls a 6 sided die (terry) Help command changed, the amount of commands in each category and overall is now displayed and formatting changed added `inspire` as an alias for inspirobot ship command -added find by mention to functions \ No newline at end of file +added find by mention to functions +you can now @mention the bot to run commands +added identity command, has definitions of gender identities and stuff +renamed math calculate diff --git a/package.json b/package.json index 1c03415..901ffbf 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "better-sqlite3": "^5.4.1", "chalk": "^3.0.0", "dblapi.js": "^2.3.1", - "discord.js": "^12.0.1", + "discord.js": "^12.0.2", "enmap": "^5.2.4", "garfield": "^1.1.2", "get-youtube-id": "^1.0.1", diff --git a/resources/images/attackhelicopter.jpg b/resources/images/attackhelicopter.jpg new file mode 100644 index 0000000..c077f0d Binary files /dev/null and b/resources/images/attackhelicopter.jpg differ diff --git a/resources/other/coolpeople.json b/resources/other/coolpeople.json index a2ec0bf..d5f335c 100644 --- a/resources/other/coolpeople.json +++ b/resources/other/coolpeople.json @@ -15,6 +15,7 @@ "254310746450690048", "358390849807319040", "211011138656272386", - "266472557740425216" + "266472557740425216", + "102943767346057216" ] } \ No newline at end of file diff --git a/resources/other/identities.json b/resources/other/identities.json index c37d5d9..4afd11a 100644 --- a/resources/other/identities.json +++ b/resources/other/identities.json @@ -101,7 +101,7 @@ }, "transgender": { "name": "transgender", - "description": "An umbrella term that refers to people whose identity differs from their assigned gender at birth." + "description": "Someone whose identity differs from their assigned gender at birth." }, "transmasculine": { "name": "transmasculine", diff --git a/resources/other/pronouns.json b/resources/other/pronouns.json index 544b7b4..fa65ece 100644 --- a/resources/other/pronouns.json +++ b/resources/other/pronouns.json @@ -1,3 +1,154 @@ { - + "ae/aer": { + "name": "ae/aer", + "examples": "• **Ae** went to the park.\n• I went with **aer**.\n• **Ae** brought **aer** frisbee.\n• At least I think it was **aers.**\n• **Ae** threw a frisbee to **aerself**." + }, + "e/em": { + "name": "e/em", + "examples": "• **E** went to the park.\n• I went with **em**.\n• **E** brought **eir** frisbee.\n• At least I think it was **eirs**.\n• **E** threw a frisbee to **emself**." + }, + "ey/em": { + "name": "ey/em", + "examples": "• **Ey** went to the park.\n• I went with **em**.\n• **Ey** brought **eir** frisbee.\n• At least I think it was **eirs**.\n• **Ey** threw a frisbee to **eirself**." + }, + "fae/faer": { + "name": "fae/faer", + "examples": "• **Fae** went to the park.\n• I went with **faer**.\n• **Fae** brought **faer** frisbee.\n• At least I think it was **faers**.\n• **Fae** threw a frisbee to **faerself**." + }, + "fey/fem": { + "name": "fey/fem", + "examples": "• **Fey** went to the park.\n• I went with **fem**.\n• **Fey** brought **feir** frisbee.\n• At least I think it was **feirs**.\n• **Fey** threw a frisbee to **feirself**." + }, + "he/him": { + "name": "he/him", + "examples": "• **He** went to the park.\n• I went with **him**.\n• **He** brought **his** frisbee.\n• At least I think it was **his**.\n• **He** threw a frisbee to **himself**." + }, + "hu/hum": { + "name": "hu/hum", + "examples": "• **Hu** went to the park.\n• I went with **hum**.\n• **Hu** brought **hus** frisbee.\n• At least I think it was **hus**.\n• **Hu** threw a frisbee to **humself**." + }, + "it/its": { + "name": "it/its", + "examples": "• **It** went to the park.\n• I went with **it**.\n• **It** brought **its** frisbee.\n• At least I think it was **its**.\n• **It** threw a frisbee to **itself**." + }, + "jee/jem": { + "name": "je/jem", + "examples": "• **Jee** went to the park.\n• I went with **jem**.\n• **Jee** brought **jeir** frisbee.\n• At least I think it was **jeirs**.\n• **Jee** threw a frisbee to **jemself**." + }, + "kit/kits": { + "name": "kit/kits", + "examples": "• **Kit** went to the park.\n• I went with **kit**.\n• **Kit** brought **kits** frisbee.\n• At least I think it was **kits**.\n• **Kit** threw a frisbee to **kitself**." + }, + "ne/nem": { + "name": "ne/nem", + "examples": "• **Ne** went to the park.\n• I went with **nem**.\n• **Ne** brought **nir** frisbee.\n• At least I think it was **nirs**.\n• **Ne** threw a frisbee to **nemself**." + }, + "peh/pehm": { + "name": "pe/pehm", + "examples": "• **Peh** went to the park.\n• I went with **pehm**.\n• **Peh** brought **peh's** frisbee.\n• At least I think it was **peh's**.\n• **Peh** threw a frisbee to **pehself**." + }, + "per": { + "name": "per/per", + "examples": "• **Per** went to the park.\n• I went with **per**.\n• **Per** brought **per** frisbee.\n• At least I think it was **pers**.\n• **Per** threw a frisbee to **perself**." + }, + "sie/hir": { + "name": "sie/hir", + "examples": "• **Sie** went to the park.\n• I went with **hir**.\n• **Sie** brought **hir** frisbee.\n• At least I think it was **hirs**.\n• **Sie* threw a frisbee to **hirself**." + }, + "se/sim": { + "name": "se/sim", + "examples": "• **Se** went to the park.\n• I went with **sim**.\n• **Se** brought **ser** frisbee.\n• At least I think it was **sers**.\n• **Se** threw a frisbee to **serself**." + }, + "shi/hir": { + "name": "shi/her", + "examples": "• **Shi** went to the park.\n• I went with **hir**.\n• **Shi** brought **shir** frisbee.\n• At least I think it was **hirs**.\n• **Shi** threw a frisbee to **hirself**." + }, + "si/hyr": { + "name": "si/hyr", + "examples": "• **Si** went to the park.\n• I went with **hyr**.\n• **Si** brought **hyr** frisbee.\n• At least I think it was **hyrs**.\n• **Si** threw a frisbee to **hyrself**." + }, + "they/them": { + "name": "they/them", + "examples": "• **They** went to the park.\n• I went with **them**.\n• **They** brought **their** frisbee.\n• At least I think it was **theirs**.\n• **They** threw a frisbee to **themself**." + }, + "thon": { + "name": "thon/thon", + "examples": "• **Thon** went to the park.\n• I went with **thon**.\n• **Thon** brought **thons** frisbee.\n• At least I think it was **thons**.\n• **Thon** threw a frisbee to **thonself**." + }, + "she/her": { + "name": "she/her", + "examples": "• **She** went to the park.\n• I went with **her**.\n• **She** brought **her** frisbee.\n• At least I think it was **hers**.\n• **She** threw a frisbee to **herself**." + }, + "ve/ver": { + "name": "ve/ver", + "examples": "• **Ve** went to the park.\n• I went with **ver**.\n• **Ve** brought **vis** frisbee.\n• At least I think it was **vis**.\n• **Ve** threw a frisbee to **verself**." + }, + "ve/vem": { + "name": "ve/vem", + "examples": "• **Ve** went to the park.\n• I went with **vem**.\n• **Ve** brought **vir** frisbee.\n• At least I think it was **virs**.\n• **Ve** threw a frisbee to **vemself**." + }, + "vi/ver": { + "name": "vi/ver", + "examples": "• **Vi** went to the park.\n• I went with **ver**.\n• **Vi** brought **ver** frisbee.\n• At least I think it was **vers**.\n• **Vi** threw a frisbee to **verself**." + }, + "vi/vim/vir": { + "name": "vi/vim/vir", + "examples": "• **Vi** went to the park.\n• I went with **vim**.\n• **Vi** brought **vir** frisbee.\n• At least I think it was **virs**.\n• **Vi** threw a frisbee to **vimself**." + }, + "vi/vim/vim": { + "name": "vi/vim/vim", + "examples": "• **Vi** went to the park.\n• I went with **vim**.\n• **Vi** brought **vim** frisbee.\n• At least I think it was **vims**.\n• **Vi** threw a frisbee to **vimself**." + }, + "xie/xer": { + "name": "xie/xer", + "examples": "• **Xie** went to the park.\n• I went with **xer**.\n• **Xie** brought **xer** frisbee.\n• At least I think it was **xers**.\n• **Xie** threw a frisbee to **xerself**." + }, + "xe/xem": { + "name": "xe/xem", + "examples": "• **Xe** went to the park.\n• I went with **xem**.\n• **Xe** brought **xyr** frisbee.\n• At least I think it was **xyrs**.\n• **Xe** threw a frisbee to **xemself**." + }, + "xey/xem": { + "name": "xey/xem", + "examples": "• **Xey** went to the park.\n• I went with **xem**.\n• **Xey** brought **xeir** frisbee.\n• At least I think it was **xeirs**.\n• **Xey** threw a frisbee to **xemself**." + }, + "yo": { + "name": "yo", + "examples": "• **Yo** went to the park.\n• I went with **yo**.\n• **Yo** brought **yos** frisbee.\n• At least I think it was **yos**.\n• **Yo** threw a frisbee to **yosself**." + }, + "ze/hir": { + "name": "ze/hir", + "examples": "• **Ze** went to the park.\n• I went with **hir**.\n• **Ze** brought **hir** frisbee.\n• At least I think it was **hirs**.\n• **Ze** threw a frisbee to **hirself**." + }, + "ze/zem": { + "name": "ze/zem", + "examples": "• **Ze** went to the park.\n• I went with **zem**.\n• **Ze** brought **zes** frisbee.\n• At least I think it was **zes**.\n• **Ze** threw a frisbee to **zirself**." + }, + "ze/mer": { + "name": "ze/mer", + "examples": "• **Ze** went to the park.\n• I went with **mer**.\n• **Ze** brought **zer** frisbee.\n• At least I think it was **zers**.\n• **Ze** threw a frisbee to **zemself**." + }, + "zee/zed": { + "name": "zee/zed", + "examples": "• **Zee** went to the park.\n• I went with **zed**.\n• **Zee** brought **zeta** frisbee.\n• At least I think it was **zetas**.\n• **Zee** threw a frisbee to **zedself**." + }, + "ze/zir": { + "name": "ze/zir", + "examples": "• **Ze** went to the park.\n• I went with **zir**.\n• **Ze** brought **zir** frisbee.\n• At least I think it was **zirs**.\n• **Ze** threw a frisbee to **zirself**." + }, + "zie/zir": { + "name": "zie/zir", + "examples": "• **Zie** went to the park.\n• I went with **zir**.\n• **Zie** brought **zir** frisbee.\n• At least I think it was **zirs**.\n• **Zie** threw a frisbee to **zirself**." + }, + "zie/zem": { + "name": "zie/zem", + "examples": "• **Zie** went to the park.\n• I went with **zem**.\n• **Zie** brought **zes** frisbee.\n• At least I think it was **zes**.\n• **Zie** threw a frisbee to **zirself**." + }, + "zie/hir": { + "name": "zie/hir", + "examples": "• **Zie** went to the park.\n• I went with **hir**.\n• **Zie** brought **hir** frisbee.\n• At least I think it was **hirs**.\n• **Zie** threw a frisbee to **hirself**." + }, + "zme/zmyr": { + "name": "zme/zmyr", + "examples": "• **Zme** went to the park.\n• I went with **zmyr**.\n• **Zme** brought **zmyr** frisbee.\n• At least I think it was **zmyrs**.\n• **Zme** threw a frisbee to **zmyrself**." + } } \ No newline at end of file diff --git a/resources/other/sexualities.json b/resources/other/sexualities.json index 544b7b4..a8805ed 100644 --- a/resources/other/sexualities.json +++ b/resources/other/sexualities.json @@ -1,3 +1,102 @@ { - + "aesthetic attraction": { + "name": "aesthetic attraction", + "description": "Getting pleasure from the appearance of a specific individual like you would from watching beautiful scenery." + }, + "platonic attraction": { + "name": "platonic attraction", + "description": "A desire to have a platonic relationship or friendship with a specific individual." + }, + "romantic attraction": { + "name": "romantic attraction", + "description": "A desire to have a romantic relationship with a specific individual." + }, + "sensual attraction": { + "name": "sensual attraction", + "description": "A desire for physical intimacy with a specific individual. Cuddling, hand holding, etc." + }, + "sexual attraction": { + "name": "sexual attraction", + "description": "A desire for sexual contact with a specific individual." + }, + "abrosexual": { + "name": "abrosexual", + "description": "Someone whose sexuality changes frequently. They experience different sexualities over time." + }, + "androgynosexual": { + "name": "androgynosexual", + "description": "Someone who is attracted to both men and women, particularly those who are androgynous in appearance." + }, + "androsexual": { + "name": "androsexual", + "description": "Someone who is attracted to men and/or masculine people." + }, + "aromantic": { + "name": "aromantic", + "description": "Someone who does not experience romantic attraction. They do not have to also be asexual however as they may still experience other types of attraction." + }, + "asexual": { + "name": "asexual", + "description": "Someone who feels little to no sexual attraction to anyone." + }, + "bisexual": { + "name": "bisexual", + "description": "Someone who is attracted to more than one gender." + }, + "ceterosexual": { + "name": "ceterosexual", + "description": "Someone who is attracted to non-binary people." + }, + "demisexual": { + "name": "demisexual", + "description": "Someone who doesn't experience sexual/romantic attraction towards someone until they form an emotional connection." + }, + "finsexual": { + "name": "finsexual", + "description": "Someone who is attracted to women and/or feminine people." + }, + "gay": { + "name": "gay", + "description": "Someone who is homosexual (attracted to ones own gender)" + }, + "gynosexual": { + "name": "gynosexual", + "description": "Someone who as attracted to women and/or feminity." + }, + "grey-romantic": { + "name": "grey-romantic", + "description": "Someone with a romantic orentiation that is somewhere between aromantic and romantic." + }, + "heterosexual": { + "name": "heterosexual", + "description": "Someone who is attracted to people of the opposite gender." + }, + "homosexual": { + "name": "homosexual", + "description": "Someone attracted to people of ones own gender." + }, + "lesbian": { + "name": "lesbian", + "description": "A woman who is attracted to other women." + }, + "omnisexual": { + "name": "omnisexual", + "description": "Someone who is attracted to all genders." + }, + "pansexual": { + "name": "pansexual", + "description": "Someone who is attracted towards people regardless of their gender identity." + }, + "pomosexual": { + "name": "pomosexual", + "description": "Someone who does not fit into any sexual orientation label." + }, + "polysexual": { + "name": "polysexual", + "description": "Someone who is attracted to some, but not all genders." + }, + "straight": { + "name": "straight", + "description": "Someone who is heterosexual (attracted to people of the opposite gender)" + } } \ No newline at end of file diff --git a/src/commands/math.js b/src/commands/calculate.js similarity index 92% rename from src/commands/math.js rename to src/commands/calculate.js index 05f0d78..e7737b3 100644 --- a/src/commands/math.js +++ b/src/commands/calculate.js @@ -29,14 +29,14 @@ exports.run = (client, message, args) => { exports.conf = { enabled: true, guildOnly: false, - aliases: ["calculate", "calc"], + aliases: ["calc", "math"], permLevel: "User", requiredPerms: [] }; exports.help = { - name: "math", + name: "calculate", category: "Utility", description: "Solves basic mathematical equations.", - usage: "math [equation]" + usage: "calculate [equation]" }; \ No newline at end of file diff --git a/src/commands/emoji.js b/src/commands/emoji.js index 795686c..ab6907b 100644 --- a/src/commands/emoji.js +++ b/src/commands/emoji.js @@ -11,7 +11,6 @@ exports.run = async (client, message, args) => { format = ".gif" }; - console.log(string.length) if(string.length > 18) { ID = string.slice(string.length - 18); } else { diff --git a/src/commands/identity.js b/src/commands/identity.js index 9be25a4..22e8693 100644 --- a/src/commands/identity.js +++ b/src/commands/identity.js @@ -6,8 +6,13 @@ exports.run = async (client, message, args) => { output += `${key}, ` }; return message.channel.send(`__**Identities**__\n${output.slice(0, -2)}`); - } else { - output = identities[args[0].toLowerCase()]; + } else { + if(args.join(" ").toLowerCase() == "attack helicopter" || args.join(" ").toLowerCase() == "apache attack helicopter" || args.join(" ").toLowerCase() == "apache") { + return message.channel.send({ + files: [new Discord.MessageAttachment("./resources/images/attackhelicopter.jpg")] + }); + } + output = identities[args.join(" ").toLowerCase()]; if(!output) { return message.channel.send("<:error:466995152976871434> No results for that query."); }; @@ -18,7 +23,7 @@ exports.run = async (client, message, args) => { exports.conf = { enabled: true, guildOnly: false, - aliases: [], + aliases: ["identities"], permLevel: "User", requiredPerms: [] }; diff --git a/src/commands/pronoun.js b/src/commands/pronoun.js new file mode 100644 index 0000000..a535647 --- /dev/null +++ b/src/commands/pronoun.js @@ -0,0 +1,36 @@ +const pronouns = require ("../../resources/other/pronouns.json"); +exports.run = async (client, message, args) => { + var output = ""; + if(!args[0]) { + for (var key of Object.keys(pronouns)) { + output += `${key}, ` + }; + return message.channel.send(`__**Pronouns**__\n${output.slice(0, -2)}`); + } else { + if(args.join(" ").toLowerCase() == "attack helicopter" || args.join(" ").toLowerCase() == "apache attack helicopter" || args.join(" ").toLowerCase() == "apache") { + return message.channel.send({ + files: [new Discord.MessageAttachment("./resources/images/attackhelicopter.jpg")] + }); + }; + output = pronouns[args.join(" ").toLowerCase()]; + if(!output) { + return message.channel.send("<:error:466995152976871434> No results for that query."); + }; + return message.channel.send(`__**Example sentences using ${output.name}**__\n${output.examples}`); + }; +}; + +exports.conf = { + enabled: true, + guildOnly: false, + aliases: ["pronouns"], + permLevel: "User", + requiredPerms: [] +}; + +exports.help = { + name: "pronoun", + category: "Fun", + description: "Gives you information on how to use the specified pronoun.", + usage: "pronoun [pronoun]" +}; diff --git a/src/commands/sexuality.js b/src/commands/sexuality.js new file mode 100644 index 0000000..8507dac --- /dev/null +++ b/src/commands/sexuality.js @@ -0,0 +1,36 @@ +const sexualities = require ("../../resources/other/sexualities.json"); +exports.run = async (client, message, args) => { + var output = ""; + if(!args[0]) { + for (var key of Object.keys(sexualities)) { + output += `${key}, ` + }; + return message.channel.send(`__**sexualities**__\n${output.slice(0, -2)}`); + } else { + if(args.join(" ").toLowerCase() == "attack helicopter" || args.join(" ").toLowerCase() == "apache attack helicopter" || args.join(" ").toLowerCase() == "apache") { + return message.channel.send({ + files: [new Discord.MessageAttachment("./resources/images/attackhelicopter.jpg")] + }); + } + output = sexualities[args.join(" ").toLowerCase()]; + if(!output) { + return message.channel.send("<:error:466995152976871434> No results for that query."); + }; + return message.channel.send(`__**${output.name}**__\n${output.description}`); + }; +}; + +exports.conf = { + enabled: true, + guildOnly: false, + aliases: ["sexualities"], + permLevel: "User", + requiredPerms: [] +}; + +exports.help = { + name: "sexuality", + category: "Fun", + description: "Gives you information about the specified sexuality.", + usage: "sexuality [sexuality]" +}; diff --git a/src/commands/ship.js b/src/commands/ship.js index 1fe3c57..8d8fef3 100644 --- a/src/commands/ship.js +++ b/src/commands/ship.js @@ -1,51 +1,42 @@ -const request = require('request') exports.run = async (client, message, args) => { - - //NOT FINISHED + var hearts = [ + "❤️", + "🧡", + "💛", + "💚", + "💙", + "💜" + ]; if(!args[0] || !args[1]) { - return message.channel.send(`<:error:466995152976871434> Please include two users`) + return message.channel.send(`<:error:466995152976871434> Please include at least two names.`) } - message.channel.startTyping(); - let users = []; + let names = []; let totalLength = 0; for(let i = 0; i < args.length; i++) { let arg = args[i]; - - let user = client.getUserFromMention(arg); - - if(!user) { - let usersFound; - usersFound = client.searchForMembers(message.guild, arg); - if (usersFound.length > 1) - return message.channel.send( - "<:error:466995152976871434> Found multiple users! Please be more specific or mention the user instead." - ); - else if (usersFound.length == 0) - return message.channel.send( - "<:error:466995152976871434> That user doesn't seem to exist. Try again!" - ); - user = usersFound[0].user; - } - - users.push(user); - totalLength += user.username.length; + let name = client.getUserFromMention(arg).username; + if(!name) { + name = arg; + }; + names.push(name); + totalLength += arg.length; } - let lengthPerUser = Math.floor(totalLength / users.length); + let lengthPerName = Math.floor(totalLength / names.length); let finalName = ''; let last = -1; - for(let i = 0; i < users.length; i++) { - let user = users[i]; - let l = Math.min(lengthPerUser, user.username.length); + for(let i = 0; i < names.length; i++) { + let name = names[i]; + let l = Math.min(lengthPerName, name.length); - let p = user.username.substr(last + 1, last + l); + let p = name.substr(last + 1, last + l); console.log(p); @@ -55,18 +46,11 @@ exports.run = async (client, message, args) => { }; console.log(totalLength); - console.log(users.length); - console.log(lengthPerUser); + console.log(names.length); + console.log(lengthPerName); console.log(finalName); - try { - //var attachment = new Discord.MessageAttachment(`https://api.alexflipnote.dev/ship?user=${user.avatarURL({format: "png"})}&user2=${user2.avatarURL({format: "png"})}`) - message.channel.send(`Your ship name is **${finalName}!**`) - message.channel.stopTyping(); - } catch(err) { - message.channel.send(`<:error:466995152976871434> API error: ${err}`); - message.channel.stopTyping(); - }; + message.channel.send(`**Ship generator:**\n${hearts.random()} Ship name: \`${finalName}\`\n${hearts.random()} Compatibility rating:`) }; exports.conf = {