diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..82515dd --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,35 @@ +name: Linting + +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + + # ESLint and Prettier must be in `package.json` + - name: Install Node.js dependencies + run: npm ci + + - name: Run linters + uses: wearerequired/lint-action@v2 + with: + eslint: true + prettier: true \ No newline at end of file diff --git a/README.md b/README.md index 4085798..42e1df2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ vinci bot +## badges yes sir +[![CodeFactor](https://www.codefactor.io/repository/github/srizan10/vinci/badge)](https://www.codefactor.io/repository/github/srizan10/vinci) # heres a roadmap - ~~form to apply for the minecraft server~~ DONE! diff --git a/commands/a.ts b/commands/haha-goofy-stuff/a.ts similarity index 87% rename from commands/a.ts rename to commands/haha-goofy-stuff/a.ts index 636887d..a3f71ef 100644 --- a/commands/a.ts +++ b/commands/haha-goofy-stuff/a.ts @@ -1,5 +1,5 @@ const { commandModule, CommandType } = require('@sern/handler'); -import { publish } from "../src/plugins/publish"; +import { publish } from "../../src/plugins/publish"; const attachment1 = 'A.png'; export default commandModule({ diff --git a/commands/joke.ts b/commands/haha-goofy-stuff/joke.ts similarity index 88% rename from commands/joke.ts rename to commands/haha-goofy-stuff/joke.ts index 41ff97d..7545e13 100644 --- a/commands/joke.ts +++ b/commands/haha-goofy-stuff/joke.ts @@ -1,6 +1,6 @@ const { commandModule, CommandType } = require('@sern/handler'); import axios from "axios"; -import { publish } from "../src/plugins/publish"; +import { publish } from "../../src/plugins/publish"; export default commandModule({ name: 'chiste', @@ -12,5 +12,5 @@ export default commandModule({ const jokeJSON = await axios( 'https://v2.jokeapi.dev/joke/Programming,Miscellaneous,Spooky,Christmas?blacklistFlags=nsfw,religious,racist,sexist,explicit' ).then((res) => res.data); - ctx.reply({content: `${jokeJSON.joke || jokeJSON.setup}\n${jokeJSON.delivery || ""}`}) + ctx.reply({content: `${jokeJSON.joke || jokeJSON.setup}\n${jokeJSON.delivery || ""}`}) }}) \ No newline at end of file diff --git a/commands/mcform.ts b/commands/misc/mcform.ts similarity index 95% rename from commands/mcform.ts rename to commands/misc/mcform.ts index 3e7cf70..bdc36f1 100644 --- a/commands/mcform.ts +++ b/commands/misc/mcform.ts @@ -1,7 +1,7 @@ const { commandModule, CommandType } = require('@sern/handler'); const { ActionRowBuilder, ButtonBuilder, ButtonStyle, ModalBuilder, EmbedBuilder, TextInputBuilder, TextInputStyle, InteractionType } = require('discord.js'); -import { publish } from "../src/plugins/publish"; -import { ownerOnly } from "../src/plugins/ownerOnly" +import { publish } from "../../src/plugins/publish"; +import { ownerOnly } from "../../src/plugins/ownerOnly" export default commandModule({ type: CommandType.Modal, diff --git a/commands/mcform_modal.ts b/commands/misc/mcform_modal.ts similarity index 93% rename from commands/mcform_modal.ts rename to commands/misc/mcform_modal.ts index f2c7887..e8f42ed 100644 --- a/commands/mcform_modal.ts +++ b/commands/misc/mcform_modal.ts @@ -1,7 +1,7 @@ const { commandModule, CommandType } = require('@sern/handler'); const { ActionRowBuilder, ButtonBuilder, ButtonStyle, ModalBuilder, EmbedBuilder, TextInputBuilder, TextInputStyle, InteractionType } = require('discord.js'); -import { publish } from "../src/plugins/publish"; -import { ownerOnly } from "../src/plugins/ownerOnly" +import { publish } from "../../src/plugins/publish"; +import { ownerOnly } from "../../src/plugins/ownerOnly" export default commandModule({ diff --git a/commands/ping.ts b/commands/misc/ping.ts similarity index 85% rename from commands/ping.ts rename to commands/misc/ping.ts index ae78ac9..bb81fc0 100644 --- a/commands/ping.ts +++ b/commands/misc/ping.ts @@ -1,5 +1,5 @@ const { commandModule, CommandType } = require('@sern/handler'); -import { publish } from "../src/plugins/publish"; +import { publish } from "../../src/plugins/publish"; export default commandModule({ name: 'ping', diff --git a/commands/kick.ts b/commands/moderation/kick.ts similarity index 92% rename from commands/kick.ts rename to commands/moderation/kick.ts index ff1c062..77da25d 100644 --- a/commands/kick.ts +++ b/commands/moderation/kick.ts @@ -1,6 +1,6 @@ const { commandModule, CommandType } = require('@sern/handler'); -import { publish } from "../src/plugins/publish"; -import { ownerOnly } from "../src/plugins/ownerOnly"; +import { publish } from "../../src/plugins/publish"; +import { ownerOnly } from "../../src/plugins/ownerOnly"; import { ApplicationCommandOptionType, EmbedBuilder } from 'discord.js' export default commandModule({ diff --git a/commands/prune.ts b/commands/moderation/prune.ts similarity index 88% rename from commands/prune.ts rename to commands/moderation/prune.ts index bcf9e24..9864de9 100644 --- a/commands/prune.ts +++ b/commands/moderation/prune.ts @@ -1,6 +1,6 @@ const { commandModule, CommandType } = require('@sern/handler'); -import { publish } from "../src/plugins/publish"; -import { ownerOnly } from "../src/plugins/ownerOnly"; +import { publish } from "../../src/plugins/publish"; +import { ownerOnly } from "../../src/plugins/ownerOnly"; import { ApplicationCommandOptionType } from 'discord.js' export default commandModule({