Answer the question
In order to leave comments, you need to log in
How do I set up a Discord bot to rename a voice channel to the name of the game the channel members are playing?
For example, 3 people are sitting on a discord channel and playing CS GO. For this voice channel to be renamed to the game that the channel members or most of the members play. If no one is playing, the default channel name is returned.
Answer the question
In order to leave comments, you need to log in
Look at the game activity and if it is even csgo then change the name of the channel....
@commands.Cog.listener()
async def on_member_update(self, before, after):
if after.activity.name == 'Counter-Strike: Global Offensive' or after.activity.name == 'Играет в Counter-Strike: Global Offensive':
#изменяете имя канала и тд.
#также можете куда-либо записывать стандартное название что бы его потом вернуть.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question