回答編集履歴

3

<= 3

2022/10/02 05:16

投稿

Cocode
Cocode

スコア2314

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

修正箇所

2022/09/30 11:05

投稿

Cocode
Cocode

スコア2314

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

2022/09/29 09:26

投稿

Cocode
Cocode

スコア2314

test CHANGED
@@ -1,3 +1,3 @@
1
- _IndentationError:_と書いてますので、コードのインデントがおかしいです。
1
+ _IndentationError:_ と書いてますので、コードのインデントがおかしいです。
2
2
  `if ctx.guild.member_count is 3:`この行を、`await ctx`のaの左端と揃えたらいけませんか?
3
3