特定 Discord 频道中的消息

时间:2021-04-11 13:28:20

标签: python-3.x discord.py

大家好,我正在尝试让机器人在特定频道中自动发送消息。我获取了频道 ID 并将其传递到 select sum(timeone-timetwosum)type_one_seconds from ( select coalesce( EXTRACT(EPOCH FROM (t1.end_time - t1.start_time)),0) timeone , coalesce((select sum(coalesce( EXTRACT(EPOCH FROM (t2.end_time - t2.start_time)),0) ) from timings t2 where t2.type=2 and t2.start_time =t1.start_time and t2.end_time<=t1.end_time),0) timetwosum from timings t1 where type=1 )t 。但是这段代码给了我这个错误。请参阅输出错误。

附言我正在使用 Replit,Live 是文件名 (Live.py)

if condition (a_string.find ('data: []')! = -1)

1 个答案:

答案 0 :(得分:1)

self.client.get_channel,不是self.get_channel,你还没有定义那个函数

channel = self.client.get_channel(828711580434169858)