aboutsummaryrefslogtreecommitdiffstats
path: root/botstrap.py
diff options
context:
space:
mode:
authorGravatar shtlrs <[email protected]>2023-03-30 12:57:29 +0100
committerGravatar shtlrs <[email protected]>2023-03-30 12:57:29 +0100
commit54bc9b2c2ffcc2633a20a0174a9ab9a0f6a848fc (patch)
tree6e59f36000dec345c35157a13255edbf50466fb2 /botstrap.py
parentupdate channels dict after forum creation (diff)
dedent signature
Diffstat (limited to 'botstrap.py')
-rw-r--r--botstrap.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/botstrap.py b/botstrap.py
index 2ed3c17af..05f96282b 100644
--- a/botstrap.py
+++ b/botstrap.py
@@ -55,10 +55,11 @@ class DiscordClient(Client):
def upgrade_server_to_community_if_necessary(
- guild_id: int | str,
- rules_channel_id_: int | str,
- announcements_channel_id_: int | str,
- client: DiscordClient) -> None:
+ guild_id: int | str,
+ rules_channel_id_: int | str,
+ announcements_channel_id_: int | str,
+ client: DiscordClient
+) -> None:
"""Fetches server info & upgrades to COMMUNITY if necessary."""
response = client.get(f"/guilds/{guild_id}")
payload = response.json()
@@ -73,10 +74,10 @@ def upgrade_server_to_community_if_necessary(
def create_forum_channel(
- channel_name_: str,
- guild_id: str,
- client: DiscordClient,
- category_id_: int | None = None
+ channel_name_: str,
+ guild_id: str,
+ client: DiscordClient,
+ category_id_: int | None = None
) -> int:
"""Creates a new forum channel."""
payload = {"name": channel_name_, "type": GUILD_FORUM_TYPE}