質問編集履歴
4
情報修正
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
3
情報修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,20 +14,19 @@
|
|
14
14
|
from discord.ext import tasks, commands
|
15
15
|
import aiohttp
|
16
16
|
from pprint import pprint
|
17
|
-
import youtube_dl
|
18
17
|
import asyncio
|
19
18
|
from datetime import datetime
|
20
19
|
import json
|
21
20
|
import typing
|
22
21
|
from os import getenv
|
23
22
|
import traceback
|
24
|
-
import random
|
25
23
|
|
26
24
|
|
27
25
|
|
28
26
|
|
29
27
|
|
30
28
|
|
29
|
+
|
31
30
|
discord_intents = discord.Intents.all()
|
32
31
|
|
33
32
|
問題はここだと思います
|
@@ -57,10 +56,6 @@
|
|
57
56
|
async def _list(ctx, arg):
|
58
57
|
await ctx.send(arg)
|
59
58
|
|
60
|
-
@bot.command()
|
61
|
-
async def omikuji(ctx):
|
62
|
-
result = ["大吉","中吉","小吉","凶","大凶"]
|
63
|
-
await ctx.send(f"{ctx.author.mention}おみくじ結果:"+ random.choice(requests))
|
64
59
|
-------------------------------------------------------------------------------------
|
65
60
|
|
66
61
|
class LibeClient(discord.Client):
|
2
情報修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,16 +1,8 @@
|
|
1
1
|
出ているエラーコード
|
2
2
|
|
3
3
|
```
|
4
|
-
Traceback (most recent call last):
|
5
|
-
File "main.py", line 104, in <module>
|
6
|
-
client = LibeClient()
|
7
|
-
File "main.py", line 72, in __init__
|
8
|
-
self.my_background_task.star
|
9
|
-
AttributeError: 'LibeClient' object has no attribute 'my_background_task'
|
10
|
-
|
4
|
+
今の所なし
|
11
5
|
|
12
|
-
|
13
|
-
|
14
6
|
```
|
15
7
|
main.py
|
16
8
|
|
@@ -87,8 +79,6 @@
|
|
87
79
|
|
88
80
|
self.counter = 0
|
89
81
|
|
90
|
-
self.my_background_task.star
|
91
|
-
|
92
82
|
async def on_message(self, message):
|
93
83
|
|
94
84
|
print('メッセージが来たよ→ {0.author}: {0.content}'.format(message))
|
1
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,18 +1,20 @@
|
|
1
|
-
|
1
|
+
出ているエラーコード
|
2
2
|
|
3
|
+
```
|
3
4
|
Traceback (most recent call last):
|
4
5
|
File "main.py", line 104, in <module>
|
5
6
|
client = LibeClient()
|
6
7
|
File "main.py", line 72, in __init__
|
7
8
|
self.my_background_task.star
|
8
9
|
AttributeError: 'LibeClient' object has no attribute 'my_background_task'
|
9
|
-
|
10
|
+
---
|
10
11
|
|
11
12
|
|
12
13
|
|
14
|
+
```
|
15
|
+
main.py
|
13
16
|
|
14
|
-
```
|
17
|
+
```
|
15
|
-
|
16
18
|
import discord
|
17
19
|
import logging
|
18
20
|
import abc
|