cannawen / dota-gsi-discord-bot

Use Dota 2's Game State Integration API to make helpful announcements in a discord voice channel
MIT License
5 stars 2 forks source link

join the channel the user is in when they give coachme command #80

Closed cannawen closed 1 year ago

cannawen commented 1 year ago

As per conversation:

— can the bot just join the channel the user is in when they give coachme command? or is there a use case where that isnt what youy want to do

canna — Maybe. Do you want to open an issue to investigate?

— i can. i just wanted to start by asking

canna — I think it'd be a good feature. Just not 100% sure about the technical feasibility

— can iterate through channels in the discord that the command came from to find the user. or maybe be ableask what channels a user is on. could also leave the func the way it is and add an optional param of the channel you want it to join maybe.

the worst case is when a user PMs the bot the command. you dont know what discord/guild they are in. a bruteforce solution form the bot is to check all channels the bot is in to see the one where that user is active.. in that case mayeb the parameter in coachme could be used but would need to know the discord/guild as well as the channel. just talking out loud i'm not sure on how the discord api works.. anyways. will create issue

canna — yeah. shirley the discord API will give us a list of users in a channel right? but. i haven't looked at that part of the api so idk xd

— well i think it should give you channels you have in common with a user so we cdont have to brute force like that dialogue when you click on a user and it shows mutual servers