質問編集履歴

6

書式の改善

2022/11/23 11:01

投稿

rr000
rr000

スコア0

test CHANGED
File without changes
test CHANGED
@@ -9,7 +9,7 @@
9
9
  RuntimeError: Event loop is closedのエラーを解決したい。
10
10
 
11
11
  ### 発生している問題・エラーメッセージ
12
- ,,,
12
+
13
13
 
14
14
  以下、エラーメッセージになります。
15
15
 
@@ -59,11 +59,11 @@
59
59
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 515, in _check_closed
60
60
  raise RuntimeError('Event loop is closed')
61
61
  RuntimeError: Event loop is closed
62
- 、、、
62
+
63
63
 
64
64
  ### 該当のソースコード
65
65
 
66
- ,,,
66
+
67
67
 
68
68
  import discord
69
69
  TOKEN = 'kokoni,TOKEN,haritukemasu' # TOKENを貼り付け
@@ -82,7 +82,6 @@
82
82
  await message.channel.send('やっほ~!')
83
83
  client.run(TOKEN)
84
84
 
85
- ```
86
85
 
87
86
  ### 試したこと
88
87
 

5

表示方法の訂正

2022/11/23 10:57

投稿

rr000
rr000

スコア0

test CHANGED
File without changes
test CHANGED
@@ -9,7 +9,7 @@
9
9
  RuntimeError: Event loop is closedのエラーを解決したい。
10
10
 
11
11
  ### 発生している問題・エラーメッセージ
12
- 、、、
12
+ ,,,
13
13
 
14
14
  以下、エラーメッセージになります。
15
15
 
@@ -63,7 +63,7 @@
63
63
 
64
64
  ### 該当のソースコード
65
65
 
66
- 、、、
66
+ ,,,
67
67
 
68
68
  import discord
69
69
  TOKEN = 'kokoni,TOKEN,haritukemasu' # TOKENを貼り付け

4

表示方法の訂正

2022/11/23 10:56

投稿

rr000
rr000

スコア0

test CHANGED
File without changes
test CHANGED
@@ -9,6 +9,7 @@
9
9
  RuntimeError: Event loop is closedのエラーを解決したい。
10
10
 
11
11
  ### 発生している問題・エラーメッセージ
12
+ 、、、
12
13
 
13
14
  以下、エラーメッセージになります。
14
15
 
@@ -58,10 +59,11 @@
58
59
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 515, in _check_closed
59
60
  raise RuntimeError('Event loop is closed')
60
61
  RuntimeError: Event loop is closed
61
- ```
62
+ 、、、
62
63
 
63
64
  ### 該当のソースコード
64
65
 
66
+ 、、、
65
67
 
66
68
  import discord
67
69
  TOKEN = 'kokoni,TOKEN,haritukemasu' # TOKENを貼り付け

3

表示方法の訂正を行いました

2022/11/23 10:55

投稿

rr000
rr000

スコア0

test CHANGED
File without changes
test CHANGED
@@ -58,8 +58,10 @@
58
58
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 515, in _check_closed
59
59
  raise RuntimeError('Event loop is closed')
60
60
  RuntimeError: Event loop is closed
61
+ ```
61
62
 
62
63
  ### 該当のソースコード
64
+
63
65
 
64
66
  import discord
65
67
  TOKEN = 'kokoni,TOKEN,haritukemasu' # TOKENを貼り付け
@@ -78,6 +80,7 @@
78
80
  await message.channel.send('やっほ~!')
79
81
  client.run(TOKEN)
80
82
 
83
+ ```
81
84
 
82
85
  ### 試したこと
83
86
 

2

試したことを更新しました

2022/11/23 09:35

投稿

rr000
rr000

スコア0

test CHANGED
File without changes
test CHANGED
@@ -81,7 +81,8 @@
81
81
 
82
82
  ### 試したこと
83
83
 
84
- サイトで見つけたものを試したのですが、上手くいきませんでした。
84
+ サイトで見つけたものを試してエラー部分を調べてみましたが、解決に至りませんでした。
85
+ 具体的には、pythonでコーディングしてbotアカウントの作成・登録、コマンドプロンプトを用いてdiscord.pyのインストール・実行を図りましたがエラーが出てしまったという風になります。
85
86
 
86
87
  ### 補足情報(FW/ツールのバージョンなど)
87
88
 

1

urlを張りなおしました

2022/11/23 08:50

投稿

rr000
rr000

スコア0

test CHANGED
File without changes
test CHANGED
@@ -62,27 +62,20 @@
62
62
  ### 該当のソースコード
63
63
 
64
64
  import discord
65
-
66
65
  TOKEN = 'kokoni,TOKEN,haritukemasu' # TOKENを貼り付け
67
-
68
66
  client = discord.Client(intents=discord.Intents.all())
69
-
70
67
  @client.event
71
68
  async def on_ready():
72
69
  print('ログインしました')
73
70
  print(client.user.name)
74
71
  print(client.user.id)
75
72
  print('________')
76
-
77
73
  @client.event
78
74
  async def on_message(message):
79
-
80
75
  if message.author.bot:
81
76
  return
82
-
83
77
  if message.content == 'こんにちは':
84
78
  await message.channel.send('やっほ~!')
85
-
86
79
  client.run(TOKEN)
87
80
 
88
81
 
@@ -94,7 +87,7 @@
94
87
 
95
88
  使用エディタ→VScode
96
89
  使用言語  →python3.9.13
97
- 参考サイト →https://qiita.com/1ntegrale9/items/9d570ef8175cf178468f
90
+ 参考サイト →[https://qiita.com/1ntegrale9/items/9d570ef8175cf178468f](url)
98
91
 
99
92
  慣れている部分が非常に少ないと感じるので、足りない部分があれば教えていただけるとありがたいです。宜しくお願い致します。
100
93