diff --git a/frontend/src/locale/en/translation.json b/frontend/src/locale/en/translation.json
index 659dbc7..624bb21 100644
--- a/frontend/src/locale/en/translation.json
+++ b/frontend/src/locale/en/translation.json
@@ -201,6 +201,7 @@
"description-help": "What does this command do?",
"access-level": "Access level",
"access-everyone": "Everyone",
+ "access-subscribers": "Subscribers",
"access-vips": "VIPs",
"access-moderators": "Moderators",
"access-streamer": "Streamer only",
diff --git a/frontend/src/store/api/types.ts b/frontend/src/store/api/types.ts
index c3bad03..6c4f4e6 100644
--- a/frontend/src/store/api/types.ts
+++ b/frontend/src/store/api/types.ts
@@ -35,7 +35,12 @@ interface TwitchModulesConfig {
enable_timers: boolean;
}
-type AccessLevelType = 'everyone' | 'vip' | 'moderators' | 'streamer';
+export type AccessLevelType =
+ | 'everyone'
+ | 'subscribers'
+ | 'vip'
+ | 'moderators'
+ | 'streamer';
export interface TwitchBotCustomCommand {
description: string;
diff --git a/frontend/src/ui/pages/twitch/Commands.tsx b/frontend/src/ui/pages/twitch/Commands.tsx
index 72644e3..8cc53b9 100644
--- a/frontend/src/ui/pages/twitch/Commands.tsx
+++ b/frontend/src/ui/pages/twitch/Commands.tsx
@@ -5,7 +5,10 @@ import { useDispatch } from 'react-redux';
import { useModule } from '../../../lib/react-utils';
import { modules } from '../../../store/api/reducer';
import Modal from '../../components/Modal';
-import { TwitchBotCustomCommand } from '../../../store/api/types';
+import {
+ AccessLevelType,
+ TwitchBotCustomCommand,
+} from '../../../store/api/types';
import Field from '../../components/Field';
interface CommandItemProps {
@@ -92,6 +95,9 @@ function CommandModal({
const [description, setDescription] = useState(
initialData?.description ?? '',
);
+ const [accessLevel, setAccessLevel] = useState(
+ initialData?.access_level ?? 'everyone',
+ );
const [response, setResponse] = useState(initialData?.response ?? '');
const { t } = useTranslation();
@@ -105,7 +111,7 @@ function CommandModal({
description,
response,
enabled: initialData?.enabled ?? false,
- access_level: 'everyone',
+ access_level: accessLevel,
});
}
};
@@ -171,10 +177,18 @@ function CommandModal({
-