Include the system ID when starting the bot
Some checks failed
Lint Pull Request / lint (push) Successful in 1m0s
release-image / release-image (push) Has been cancelled

This commit is contained in:
Logan Cusano
2025-07-06 19:35:00 -04:00
parent 20187a06f0
commit e64984b7b8

View File

@@ -150,14 +150,15 @@ const IndividualClientPage: React.FC<IndividualClientPageProps> = ({ clientId, t
"system_id": selectedSystem
});
} else if (action === "join") {
if (!payloadData?.server_id || !payloadData?.channel_id) {
if (!payloadData?.server_id || !payloadData?.channel_id || !selectedSystem) {
setError("Please provide both Discord Server ID and Channel ID.");
setLoading(false);
return;
}
httpOptions.body = JSON.stringify({
"guild_id": payloadData.server_id,
"channel_id": payloadData.channel_id
"channel_id": payloadData.channel_id,
"system_id": selectedSystem
});
} else if (action === "leave") {
if (!payloadData?.guild_id) {
@@ -335,9 +336,24 @@ const IndividualClientPage: React.FC<IndividualClientPageProps> = ({ clientId, t
placeholder="Enter Discord Channel ID"
/>
</div>
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="system-select" className="text-right">Select System</Label>
<Select onValueChange={setSelectedSystem} value={selectedSystem || ''}>
<SelectTrigger className="col-span-3">
<SelectValue placeholder="Choose a system" />
</SelectTrigger>
<SelectContent>
{availableSystems.map((system) => (
<SelectItem key={system._id} value={system._id}>
{system.name} ({system._id})
</SelectItem>
))}
</SelectContent>
</Select>
</div>
</div>
<DialogFooter>
<Button onClick={handleConfirmJoin} disabled={!discordServerId || !discordChannelId || loading || !token}>
<Button onClick={handleConfirmJoin} disabled={!discordServerId || !discordChannelId || !selectedSystem || loading || !token}>
{loading ? 'Joining...' : 'Confirm Join'}
</Button>
<Button variant="outline" onClick={() => setIsJoinDiscordDialogOpen(false)}>