回答編集履歴
3
<= 3
test
CHANGED
@@ -14,3 +14,10 @@
|
|
14
14
|
if ctx.guild.member_count == 3:
|
15
15
|
await guild.leave() # Guild found
|
16
16
|
```
|
17
|
+
|
18
|
+
追記:
|
19
|
+
3人の時に脱退と、3人だけに限定されているので、3人以下という記述に変更
|
20
|
+
```python
|
21
|
+
if ctx.guild.member_count <= 3:
|
22
|
+
await guild.leave() # Guild found
|
23
|
+
```
|
2
修正箇所
test
CHANGED
@@ -1,3 +1,16 @@
|
|
1
1
|
_IndentationError:_ と書いてますので、コードのインデントがおかしいです。
|
2
2
|
`if ctx.guild.member_count is 3:`この行を、`await ctx`のaの左端と揃えたらいけませんか?
|
3
3
|
|
4
|
+
---
|
5
|
+
|
6
|
+
質問が編集されたので追加:
|
7
|
+
これでいけませんか?
|
8
|
+
```python
|
9
|
+
if (ctx.guild.member_count == 3:)
|
10
|
+
await guild.leave() # Guild found
|
11
|
+
```
|
12
|
+
↓
|
13
|
+
```python
|
14
|
+
if ctx.guild.member_count == 3:
|
15
|
+
await guild.leave() # Guild found
|
16
|
+
```
|
1
typo
test
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
_IndentationError:_と書いてますので、コードのインデントがおかしいです。
|
1
|
+
_IndentationError:_ と書いてますので、コードのインデントがおかしいです。
|
2
2
|
`if ctx.guild.member_count is 3:`この行を、`await ctx`のaの左端と揃えたらいけませんか?
|
3
3
|
|