Add global /about command and configuration
- Introduced `BotAboutConfig` model for managing the global `/about` message in the owner panel. - Implemented the `/about` command with localization support and integrated it into the help catalog. - Enhanced the dashboard with a new owner section for configuring the `/about` message type and content. - Updated components to handle the new command and its interactions, including support for different message formats (TEXT, EMBED, COMPONENTS_V2). - Added localization entries for the `/about` command in English and German, improving accessibility for users. - Documented the implementation in the phase tracking documentation for future reference.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
BotAboutConfigSchema,
|
||||
BotPresenceConfigSchema,
|
||||
FeatureFlagUpsertSchema,
|
||||
ownerRoleAtLeast,
|
||||
@@ -19,6 +20,17 @@ describe('owner schemas', () => {
|
||||
expect(parsed.activityText).toBe('nexumi.de');
|
||||
});
|
||||
|
||||
it('parses about config', () => {
|
||||
const parsed = BotAboutConfigSchema.parse({
|
||||
enabled: true,
|
||||
messageType: 'EMBED',
|
||||
content: null,
|
||||
embed: { title: 'About', description: 'Nexumi', color: 0x6366f1 },
|
||||
components: null
|
||||
});
|
||||
expect(parsed.embed?.title).toBe('About');
|
||||
});
|
||||
|
||||
it('ranks owner roles', () => {
|
||||
expect(ownerRoleAtLeast('ADMIN', 'SUPPORT')).toBe(true);
|
||||
expect(ownerRoleAtLeast('VIEWER', 'ADMIN')).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user