Python 我在特定频道的工作脚本有问题
这是我认为我的最后一个问题,因为我不知道如何使我的脚本只在特定的频道工作这是我尝试的:Python 我在特定频道的工作脚本有问题,python,python-3.x,discord,discord.py,discord.py-rewrite,Python,Python 3.x,Discord,Discord.py,Discord.py Rewrite,这是我认为我的最后一个问题,因为我不知道如何使我的脚本只在特定的频道工作这是我尝试的: ch = client.get_channel('my number channel id') if message.channel is not ch: return 下面是错误: 文件“”,第101行 如果message.channel不是ch: ^ 缩进错误:unindent不匹配任何外部缩进级别您有缩进问题(在python中,缩进是定义函数或类范围的方式)。试试这个: ch =
ch = client.get_channel('my number channel id')
if message.channel is not ch:
return
下面是错误:
文件“”,第101行
如果message.channel不是ch:
^
缩进错误:unindent不匹配任何外部缩进级别您有缩进问题(在python中,缩进是定义函数或类范围的方式)。试试这个:
ch = client.get_channel('my number channel id')
if message.channel is not ch:
return