'NameError: name 'guild' is not defined. What the problem is?
mC = guild.member_count
channel = client.get_channel(798156048571948463)
await channel.edit(name = f"Member count: {mC}")
The problem is in "mC" but why?
Solution 1:[1]
You can do what @IPSDSILVA did to get a specific guild or you can define guild by doing ctx.guild.member_count to get the member count of the server that the command was run in. Make sure you have ctx as a parameter if you do this way.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | PRA7H1K |
