Include the system ID when starting the bot
This commit is contained in:
@@ -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)}>
|
||||
|
||||
Reference in New Issue
Block a user