Archived
0
0
Fork 0

style: fomatted code

This commit is contained in:
Daryl Ronningen 2021-07-02 13:37:02 -05:00
parent bd995747fa
commit 523be3e439
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
8 changed files with 39 additions and 26 deletions

View file

@ -165,6 +165,15 @@
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="SQL">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="true" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="SPACE_BEFORE_IF_PARENTHESES" value="false" />
<option name="SPACE_BEFORE_WHILE_PARENTHESES" value="false" />

4
.idea/encodings.xml Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8" />
</project>

View file

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

View file

@ -1,5 +1,8 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Default" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
<list size="7">
<item index="0" class="java.lang.String" itemvalue="INFORMATION" />
<item index="1" class="java.lang.String" itemvalue="TYPO" />

View file

@ -50,7 +50,7 @@ export default class extends Command {
commandGroups.push({
name: command.options.group!,
embed: new MessageEmbed(),
commands: [command],
commands: [ command ],
});
categories.push(command.options.group!);
@ -96,8 +96,8 @@ export default class extends Command {
const helpMsg = await message.channel.send({
content: i18next.t('commands:help.helpScreenBtnHelp'),
embeds: [commandGroups[0]!.embed],
components: [[previousCategoryBtn, nextCategoryBtn], [chooseHelpCategory]],
embeds: [ commandGroups[0]!.embed ],
components: [ [ previousCategoryBtn, nextCategoryBtn ], [ chooseHelpCategory ] ],
});
const buttonCollector = helpMsg.channel.createMessageComponentInteractionCollector({ time: 60000 });
@ -118,8 +118,8 @@ export default class extends Command {
await interaction.update({
content: i18next.t('commands:help.helpScreenBtnHelp'),
embeds: [commandGroups[currentPage]!.embed],
components: [[previousCategoryBtn, nextCategoryBtn], [chooseHelpCategory]],
embeds: [ commandGroups[currentPage]!.embed ],
components: [ [ previousCategoryBtn, nextCategoryBtn ], [ chooseHelpCategory ] ],
});
} else if(interaction.customID === 'previousCategoryBtn') {
currentPage--;
@ -136,8 +136,8 @@ export default class extends Command {
await interaction.update({
content: i18next.t('commands:help.helpScreenBtnHelp'),
embeds: [commandGroups[currentPage]!.embed],
components: [[previousCategoryBtn, nextCategoryBtn], [chooseHelpCategory]],
embeds: [ commandGroups[currentPage]!.embed ],
components: [ [ previousCategoryBtn, nextCategoryBtn ], [ chooseHelpCategory ] ],
});
} else if(interaction.customID === 'chooseHelpCategory') {
currentPage = categories.indexOf(interaction.values[0]);
@ -159,8 +159,8 @@ export default class extends Command {
await interaction.update({
content: i18next.t('commands:help.helpScreenBtnHelp'),
embeds: [commandGroups[currentPage]!.embed],
components: [[previousCategoryBtn, nextCategoryBtn], [chooseHelpCategory]],
embeds: [ commandGroups[currentPage]!.embed ],
components: [ [ previousCategoryBtn, nextCategoryBtn ], [ chooseHelpCategory ] ],
});
}
});
@ -171,7 +171,7 @@ export default class extends Command {
await helpMsg.edit({
content: i18next.t('commands:help.helpTimedOut'),
embeds: [commandGroups[currentPage]!.embed],
embeds: [ commandGroups[currentPage]!.embed ],
components: [],
});
});
@ -192,7 +192,7 @@ export default class extends Command {
usage: findCommand.options.usage ? `!${findCommand.options.name} ${findCommand.options.usage}` : i18next.t('commands:generic.noUsage'),
}));
await message.channel.send({ embeds: [commandEmbed] });
await message.channel.send({ embeds: [ commandEmbed ] });
} else {
await message.reply(i18next.t('commands:help.unknownCommand'));
}

View file

@ -29,7 +29,7 @@ export default class extends Command {
args: [
{
name: 'language',
acceptedValues: ['js', 'javascript', 'ts', 'typescript'],
acceptedValues: [ 'js', 'javascript', 'ts', 'typescript' ],
description: i18next.t('commands:vm.languageArg'),
},
{

View file

@ -70,8 +70,8 @@ figlet('Argon Bot', (err, data) => {
});
const client = new ArgonClient({
intents: ['GUILDS', 'GUILD_MESSAGES', 'DIRECT_MESSAGES'],
partials: ['CHANNEL'],
intents: [ 'GUILDS', 'GUILD_MESSAGES', 'DIRECT_MESSAGES' ],
partials: [ 'CHANNEL' ],
});
client.on('message', async (msg) => {
@ -122,7 +122,10 @@ client.on('message', async (msg) => {
if(now < expirationTime) {
const timeLeft = (expirationTime - now) / 1000;
await msg.reply(i18next.t('commands:errors.cooldownError', { time: timeLeft.toFixed(1), command: findCommand.options.name }));
await msg.reply(i18next.t('commands:errors.cooldownError', {
time: timeLeft.toFixed(1),
command: findCommand.options.name,
}));
msg.channel.stopTyping();
return;
}
@ -148,14 +151,14 @@ client.on('ready', async () => {
info('Loading translations...', ELoggingScope.Startup);
await i18next.use(Fluent).use(Backend).init({
supportedLngs: ['en-US', 'owo'],
supportedLngs: [ 'en-US', 'owo' ],
lng: 'en-US',
fallbackLng: 'en-US',
defaultNS: 'common',
fallbackNS: 'common',
ns: ['common', 'commands'],
ns: [ 'common', 'commands' ],
backend: {
backends: [FSBackend],
backends: [ FSBackend ],
backendOptions: [
{
loadPath: `${process.cwd()}/translations/{{lng}}/{{ns}}.json`,

View file

@ -19,7 +19,7 @@ export const Defaults = {
logLevel: 'info',
},
configSchema: {
required: ['token', 'logLevel', 'prefix', 'owner', 'db'],
required: [ 'token', 'logLevel', 'prefix', 'owner', 'db' ],
type: 'object',
properties: {
token: {
@ -49,7 +49,7 @@ export const Defaults = {
db: {
$id: '#/properties/db',
type: 'object',
required: ['host', 'port', 'user', 'password', 'database'],
required: [ 'host', 'port', 'user', 'password', 'database' ],
properties: {
host: {
$id: '#/properties/db/host',