mirror of https://github.com/vizality/vizality
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
803 B
30 lines
803 B
import React from 'react';
|
|
|
|
import { toPlural, toTitleCase } from '@vizality/util/string';
|
|
import { AddonsList } from '@vizality/components/addon';
|
|
import { FormTitle } from '@vizality/components';
|
|
|
|
export default {
|
|
command: 'manage',
|
|
description: 'Allows you to manage your addons directly in chat.',
|
|
executor (_, type) {
|
|
const result = {
|
|
type: 'rich',
|
|
color: type === 'plugin' ? 0x42ffa7 : 0xb68aff,
|
|
provider: {
|
|
name: <>
|
|
<FormTitle tag='h2' className='vz-manager-command-addon-manage-header'>
|
|
{`Manage ${toTitleCase(toPlural(type))}`}
|
|
</FormTitle>
|
|
<AddonsList className='vz-addons-list-embed' type={type} display='compact' limit={8} />
|
|
</>
|
|
}
|
|
};
|
|
|
|
return {
|
|
send: false,
|
|
result
|
|
};
|
|
}
|
|
};
|