Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
checking someones roles while in VC
Post Body

connection.receiver.speaking.on("start", async (userID) => {

    if(check(!interaction.member.roles.cache.has(role), userID)) {return;}//

So my bot is to check if someone has a role when they talk. when I run a slash command I am able to get the bot into the VC and run this If statement but I get a few problems.
so what this if statement does, is it checks if someone has a role and if the user is in a small array. if they don't have the role and if they are not in the small array it returns out of the speaking event.

  1. so the goal for .has(role) is if they !have a role it will send false skipping that check in my function, but has(role) is returning false (making it true and breaking the check) when they have the role
  2. I believe interaction has to do with the person who made the slash command, not the userID member, can I replace interaction with something else to ensure I get a proper check? I am running my slash command in a separate file like how the discord.js guide does it, so guild is undefined, I don't know if I can import guild or anything like that

so tldr

has(role) returns the wrong boolean (I have !..has(role) because I want false if they have the role)

I don't believe interaction is the proper way to check for user information and other methods like guild... is undefined
Thank you

Author
Account Strength
100%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
5,142
Link Karma
834
Comment Karma
4,280
Profile updated: 2 days ago
Posts updated: 2 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago