diff --git a/autoroom/control_panel.py b/autoroom/control_panel.py index 4eb49f7..50a96da 100644 --- a/autoroom/control_panel.py +++ b/autoroom/control_panel.py @@ -205,6 +205,11 @@ class ControlPanel: if not owner: return + # Get the associated text channel + text_channel = autoroom.guild.get_channel(autoroom.id) + if not text_channel: + return + # Create the embed embed = discord.Embed( title="AutoRoom Control Panel", @@ -222,7 +227,7 @@ class ControlPanel: # Create view with buttons view = ControlPanelView(self.cog, autoroom.id) - # Send the embed - message = await autoroom.send(embed=embed, view=view) + # Send the embed to the text channel + message = await text_channel.send(embed=embed, view=view) # Store the message ID for reference await self.config.channel(autoroom).control_panel_message_id.set(message.id) \ No newline at end of file