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 | bfbbe46b97bad9f21905d53d03eeb09cba52f6ac (patch) | |
| tree | 3467cb2b555125123c01f67aadb9daa201bae741 /commands/util | |
| parent | efe4a6017895128c3c41fb81fbbb3a7dbf22ad08 (diff) | |
pronoun detecting and fixes
Diffstat (limited to 'commands/util')
| -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 |
