diff options
author | ame <[email protected]> | 2023-12-20 17:06:51 -0600 |
---|---|---|
committer | ame <[email protected]> | 2023-12-20 17:06:51 -0600 |
commit | 01e1ebd6ef55480edd71d96dd2d89bc8141af5b9 (patch) | |
tree | 2f4e20d6f6b084776b2e5db7c96f68d844c2d5f1 /commands/util/emote.js | |
parent | 344eeaf9916ed275a4a71fded580a8be70bf1f61 (diff) |
pronoun detecting and fixes
Diffstat (limited to 'commands/util/emote.js')
-rw-r--r-- | commands/util/emote.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/commands/util/emote.js b/commands/util/emote.js index a6f4430..1b69c95 100644 --- a/commands/util/emote.js +++ b/commands/util/emote.js @@ -25,6 +25,24 @@ module.exports = { else interaction.reply({content:"invalid emote!", ephemeral: true}) }, + async get_pronouns(message, userid){ + let pronoun = null + let count = 0 + /* + would add more pronouns, but we dont have any pronoun roles + */ + message.member.roles.cache.some((r) => { + switch(r.name.toLowerCase()){ + case "she/her": + pronoun = "herself"; count++ + break; + case "he/him": + pronoun = "himself"; count++ + break; + } + }) + return count == 1? pronoun : "themselves" + }, async exec(client,param){ let msg = ""; if(Object.keys(config.avaliable_multi.value).includes(param.emote)){ @@ -32,7 +50,7 @@ module.exports = { if(!param.mentioned) return param.message.reply({content:"please mention someone", ephemeral: true}) if(param.mentioned.id==param.message.author.id) - msg="<@"+param.message.author.id+"> "+config.avaliable_multi.value[param.emote]+" themselves" + msg="<@"+param.message.author.id+"> "+config.avaliable_multi.value[param.emote]+" "+await this.get_pronouns(param.message, param.message.author.id) else if(param.mentioned.id=="762561860150362142") msg="<@"+param.message.author.id+"> "+config.avaliable_multi.value[param.emote]+" me!" else |