feat(Script/Commands): Add account flag commands (#26301)

This commit is contained in:
Kitzunu
2026-07-19 14:36:40 +02:00
committed by GitHub
parent ad66a0b768
commit e2b02697fd
8 changed files with 204 additions and 46 deletions

View File

@@ -0,0 +1,13 @@
DELETE FROM `rbac_permissions` WHERE `id` IN (941, 942, 943, 944);
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
(941, 'Command: account flag'),
(942, 'Command: account flag list'),
(943, 'Command: account flag add'),
(944, 'Command: account flag remove');
DELETE FROM `rbac_linked_permissions` WHERE `linkedId` IN (941, 942, 943, 944);
INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES
(197, 941),
(197, 942),
(196, 943),
(196, 944);

View File

@@ -0,0 +1,15 @@
DELETE FROM `command` WHERE `name` IN ('account flag', 'account flag list', 'account flag add', 'account flag remove');
INSERT INTO `command` (`name`, `security`, `help`) VALUES
('account flag', 2, 'Syntax: .account flag $subcommand\nType .account flag to see the list of possible subcommands or .help account flag $subcommand to see info on subcommands.'),
('account flag list', 2, 'Syntax: .account flag list [$account]\nLists every AccountFlag currently set on $account. Defaults to your own account when no argument is given.'),
('account flag add', 3, 'Syntax: .account flag add $account $flag\nSets an AccountFlag on $account. $flag is a symbolic name in either its full form (e.g. ACCOUNT_FLAG_TRIAL) or short form (e.g. TRIAL). ACCOUNT_FLAG_GM is managed automatically and cannot be changed manually.'),
('account flag remove', 3, 'Syntax: .account flag remove $account $flag\nClears an AccountFlag on $account. $flag is a symbolic name in either its full form (e.g. ACCOUNT_FLAG_TRIAL) or short form (e.g. TRIAL). ACCOUNT_FLAG_GM is managed automatically and cannot be changed manually.');
DELETE FROM `acore_string` WHERE `entry` IN (35465, 35466, 35467, 35468, 35469, 35470);
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES
(35465, 'Account flags set on {} ({}):'),
(35466, 'Account {} ({}) has no flags set.'),
(35467, 'Unknown account flag: {}. Use a symbolic name (e.g. ACCOUNT_FLAG_TRIAL or TRIAL).'),
(35468, 'ACCOUNT_FLAG_GM is managed automatically and cannot be changed manually.'),
(35469, 'Added {} to account {} ({}).'),
(35470, 'Removed {} from account {} ({}).');