Skip to content

Commit

Permalink
bump deps, remove amazon
Browse files Browse the repository at this point in the history
Signed-off-by: circa10a <caleblemoine@gmail.com>
  • Loading branch information
circa10a committed Sep 29, 2024
1 parent 2467d7e commit cae91e6
Show file tree
Hide file tree
Showing 8 changed files with 432 additions and 935 deletions.
29 changes: 0 additions & 29 deletions .eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ npm start
## Commands

- `8ball` - `ava 8ball should I order chinese food?` answers questions for you.
- `amazon` - `ava amazon something something` searches for things on amazon.
- `bored` - `ava bored` gives you a random activity to do.
- `brewery` - `ava brewery new_york` gives you a random brewery from a city of your choosing.
- `catfact` - `ava catfact` gives random fact about cats.
Expand Down
55 changes: 0 additions & 55 deletions commands/amazon.js

This file was deleted.

31 changes: 31 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends('eslint:recommended'), {
languageOptions: {
globals: {
...globals.node,
},

ecmaVersion: 12,
sourceType: 'module',
},

rules: {
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
}];
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const { AVA_DISCORD_TOKEN, AVA_ENABLE_REMINDERS } = process.env;
// Remindme is a special case where we need to pass in the db
import remindMe from './commands/remindme.js';

logger.info(`Node version: ${process.version}`);

if (!AVA_DISCORD_TOKEN) {
logger.error('Missing AVA_DISCORD_TOKEN environment variable');
process.exit(1);
Expand Down Expand Up @@ -61,7 +63,7 @@ if (AVA_ENABLE_REMINDERS) {
// Start reminder daemon
startReminderDaemon({
client: client,
checkForRemindersInterval: 60000, // 1m
checkForRemindersInterval: 300000, // 5m
db: db
});
})().catch((e) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const stringIsAValidUrl = (s) => {
try {
new URL(s);
return true;
} catch (err) {
} catch {
return false;
}
};
Expand Down
Loading

0 comments on commit cae91e6

Please sign in to comment.