Hi @abbas izadipour
Sorry, I'm not an expert in JS, but as far as I know, you probably can't directly retrieve the team it belongs to based on a given channel id.
The only feasible solution is to first get the team set, then iterate over the team set to get the id of each team, next pass the team id to get the channel set of each team, then iterate over the channel set to get the id of each channel of each team, and finally use these channel ids to compare with the current channel id, and if they are equal, return the corresponding team id and name.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.