質問編集履歴

1

ソースコードの変更

2021/08/24 16:15

投稿

maruyu
maruyu

スコア19

test CHANGED
File without changes
test CHANGED
@@ -36,14 +36,22 @@
36
36
 
37
37
 
38
38
 
39
- ```elif
39
+ ```if
40
40
 
41
- elif message.content == "!test":
41
+ async def on_message(message):
42
42
 
43
- chid = message.channel.id
43
+ mentions = message.mentions
44
44
 
45
- loop = asyncio.get_event_loop()
45
+ if message.author.bot:
46
46
 
47
+ return
48
+
49
+ if message.content == "!test":
50
+
51
+ chid = message.channel.id
52
+
53
+ loop = asyncio.get_event_loop()
54
+
47
- loop.run_until_complete(test(chid))
55
+ loop.run_until_complete(test(chid))
48
56
 
49
57
  ```