From 1c4a3d8263d9af94bf68309594daa2b6947fd56b Mon Sep 17 00:00:00 2001 From: Compey Date: Sun, 27 Nov 2022 20:21:25 +0530 Subject: [PATCH] chore: lint & prettier --- packages/framework/typescript/.gitignore | 201 +++++++++--------- .../typescript/src/typings/command.ts | 19 ++ .../typescript/src/typings/events.ts | 4 + 3 files changed, 122 insertions(+), 102 deletions(-) create mode 100644 packages/framework/typescript/src/typings/command.ts create mode 100644 packages/framework/typescript/src/typings/events.ts diff --git a/packages/framework/typescript/.gitignore b/packages/framework/typescript/.gitignore index a9b66b1..acd1933 100644 --- a/packages/framework/typescript/.gitignore +++ b/packages/framework/typescript/.gitignore @@ -1,102 +1,99 @@ -# Dependency directory -node_modules - -# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output -.nuxt - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# OS metadata -.DS_Store -Thumbs.db - -# Ignore built ts files -__tests__/runner/* - -# TypeScript build output -dist -dist/* +# Dependency directory +node_modules + +# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +jspm_packages/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# OS metadata +.DS_Store +Thumbs.db + +# Ignore built ts files +__tests__/runner/* + +# TypeScript build output +dist +dist/* diff --git a/packages/framework/typescript/src/typings/command.ts b/packages/framework/typescript/src/typings/command.ts new file mode 100644 index 0000000..283c3b1 --- /dev/null +++ b/packages/framework/typescript/src/typings/command.ts @@ -0,0 +1,19 @@ +import { Embed, Member, Message, User } from "guilded.js"; +import { ExtendedClient } from "../structures/Client"; + +export type ResCtx = { + meta: { + user: Member; + raw: Message; + }; + ctx: { + getOptions: () => null | string[]; + reply: (content: string | Embed) => void; + }; +}; + +export type CommandType = { + name: string; + description: string; + run: (context: { interaction: ResCtx }) => {}; +}; diff --git a/packages/framework/typescript/src/typings/events.ts b/packages/framework/typescript/src/typings/events.ts new file mode 100644 index 0000000..e5b61de --- /dev/null +++ b/packages/framework/typescript/src/typings/events.ts @@ -0,0 +1,4 @@ +import { ClientEvents } from "guilded.js"; +export type extendedEvents = ClientEvents & { + interactionCreate: (...args) => unknown; +};