浏览代码

Fix method name

Alex Taber 6 年前
父节点
当前提交
daac622c9c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      app.py

+ 2
- 2
app.py 查看文件

29
 
29
 
30
 matrix_file_types = ('m.file', 'm.image', 'm.video', 'm.audio')
30
 matrix_file_types = ('m.file', 'm.image', 'm.video', 'm.audio')
31
 
31
 
32
-def prepare_matrix_client(message):
32
+def prepare_matrix_content(message):
33
 	attachments = "\n".join([x.url for x in message.attachments])
33
 	attachments = "\n".join([x.url for x in message.attachments])
34
 	content = message.clean_content + ("\n" + attachments if attachments != "" else "")
34
 	content = message.clean_content + ("\n" + attachments if attachments != "" else "")
35
 	return content
35
 	return content
38
 async def on_message(message):
38
 async def on_message(message):
39
 	if message.author.discriminator == "0000" or message.channel.id != discord_channel: return
39
 	if message.author.discriminator == "0000" or message.channel.id != discord_channel: return
40
 	username = message.author.name[:1] + "\u200B" + message.author.name[1:] + "#" + message.author.discriminator
40
 	username = message.author.name[:1] + "\u200B" + message.author.name[1:] + "#" + message.author.discriminator
41
-	content = prepare_matrix_client(message)
41
+	content = prepare_matrix_content(message)
42
 	matrix_room.send_text("<{}> {}".format(username, content))
42
 	matrix_room.send_text("<{}> {}".format(username, content))
43
 
43
 
44
 def send_webhook(username, avatar_url, content):
44
 def send_webhook(username, avatar_url, content):