diff --git a/autoroom/autoroom.py b/autoroom/autoroom.py index 0baf195..98cb49f 100644 --- a/autoroom/autoroom.py +++ b/autoroom/autoroom.py @@ -68,6 +68,8 @@ class AutoRoom( "owner": None, "associated_text_channel": None, "denied": [], + "message_id": None, + "waiting_room_message_id": None, } extra_channel_name_change_delay = 4 diff --git a/autoroom/control_panel.py b/autoroom/control_panel.py index 1cafbc3..57bbbd1 100644 --- a/autoroom/control_panel.py +++ b/autoroom/control_panel.py @@ -205,10 +205,10 @@ class ControlPanel: if not owner: return - # Get the associated text channel + # Get the associated text channel using the voice channel's ID text_channel = None for channel in autoroom.guild.text_channels: - if channel.name == autoroom.name: + if channel.id == autoroom.id: text_channel = channel break diff --git a/autoroom/waiting_room.py b/autoroom/waiting_room.py index d3edb2e..2c1128f 100644 --- a/autoroom/waiting_room.py +++ b/autoroom/waiting_room.py @@ -141,8 +141,13 @@ class WaitingRoom: if not autoroom_info: return - # Get the voice channel's text chat - text_channel = autoroom.guild.get_channel(autoroom.id) + # Get the voice channel's text chat using the voice channel's ID + text_channel = None + for channel in autoroom.guild.text_channels: + if channel.id == autoroom.id: + text_channel = channel + break + if not text_channel: return