There have been similar questions but I havent been able to find an exact match so I apologize in advance.
I have am application form that someone fills out and provides their discord user tag (ex: Bob#1111). This form then gets sent to my discord (which that user has already joined). I then process it with my bot which creates a channel, copies the application to that channel and uses the discord user tag of the applicant to get their discord information and give them permissions on that newly created channel.
This worked for a few years prior to v13 but now its no longer working. Prior code was simply :
await guild.members.fetch()
let userID = client.users.cache.find(user => user.tag === userTag)
Any thoughts would be greatly appreciated.
Since you didn't explain what the actual issue is, I can only assume that the problem is when you try to give the user permissions for the channel.
Make sure to find the member in your server:
const member = await guild.members.cache.get(userID.id)
and then give the permissions for the found member.
For what you're trying to do, I would recommend getting the member by their ID. You can do this by doing:
const member = guild.members.fetch('user-id')
For your code, userID will in fact give you the entire user class, not just the ID. You can access the user's ID by doing userID.id.
Additionally, you can view an example of how to set channel overwrites in discord.js guide.