Merge pull request #483 from VermiumSifell/dev

Improve developer experience
This commit is contained in:
Axel Olausson Holtenäs 2022-11-03 15:13:58 +01:00 committed by GitHub
commit cd47d11339
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 6996 additions and 13191 deletions

View file

@ -1,16 +1,11 @@
name: Docker Image CI
on:
schedule:
- cron: "0 10 * * *"
push:
branches:
- "**"
tags:
- "v*.*.*"
pull_request:
branches:
- "main"
tags:
- "*.*.*"
jobs:
docker:

View file

@ -3,50 +3,30 @@
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"abrahamwilliam007.es7-javascript-class-snippets",
"nicoespeon.abracadabra",
"mgmcdermott.vscode-language-babel",
"aaron-bond.better-comments",
"streetsidesoftware.code-spell-checker",
"adpyke.codesnap",
"mikestead.dotenv",
"mateuszdrewniak.theme-dracula-dark-plus",
"irongeek.vscode-env",
"dbaeumer.vscode-eslint",
"dracula-theme.theme-dracula",
"mhutchie.git-graph",
"donjayamanne.githistory",
"github.github-vscode-theme",
"eamodio.gitlens",
"vtrois.gitmoji-vscode",
"xabikos.javascriptsnippets",
"christian-kohler.npm-intellisense",
"christian-kohler.path-intellisense",
"dbaeumer.vscode-eslint",
"donjayamanne.githistory",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"github.github-vscode-theme",
"irongeek.vscode-env",
"xabikos.javascriptsnippets",
"wix.vscode-import-cost",
"vscode-icons-team.vscode-icons",
"visualstudioexptteam.vscodeintellicode",
"teledemic.branch-warnings",
"tabnine.tabnine-vscode",
"streetsidesoftware.code-spell-checker",
"seatonjiang.gitmoji-vscode",
"sburg.vscode-javascript-booster",
"kisstkondoros.vscode-codemetrics",
"mgmcdermott.vscode-language-babel",
"mhutchie.git-graph",
"mikestead.dotenv",
"mongodb.mongodb-vscode",
"ms-vscode-remote.remote-wsl-recommender",
"ms-vscode.js-debug",
"ms-vscode.js-debug-companion",
"ms-vscode.references-view",
"ms-vscode.vscode-js-profile-table",
"pflannery.vscode-versionlens",
"adpyke.codesnap",
"anan.devdocstab",
"axosoft.gitkraken-glo",
"gruntfuggly.todo-tree",
"kiteco.kite",
"lkytal.pomodoro",
"wayou.vscode-todo-highlight",
"johnpapa.vscode-peacock",
"stepsize.stepsize",
"nicoespeon.abracadabra",
"sonarsource.sonarlint-vscode",
"nicoespeon.hocus-pocus",
"aaron-bond.better-comments",
"oouo-diogo-perdigao.docthis",
"Vtrois.gitmoji-vscode"
"esbenp.prettier-vscode",
"wayou.vscode-todo-highlight",
"gruntfuggly.todo-tree",
"pflannery.vscode-versionlens",
"vscode-icons-team.vscode-icons"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []

19884
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -33,46 +33,29 @@
"email": "vermium@zyner.org"
},
"dependencies": {
"@discordjs/rest": "^1.0.0",
"@prisma/client": "^4.5.0",
"@types/i18next-fs-backend": "^1.1.2",
"axios": "^1.0.0",
"chance": "^1.1.8",
"common": "^0.2.5",
"crypto": "^1.0.1",
"date-fns": "^2.29.3",
"discord-api-types": "^0.37.0",
"discord.js": "^14.0.0",
"dotenv": "^16.0.1",
"i18n": "^0.15.0",
"i18next": "^22.0.0",
"i18next-async-backend": "^2.0.0",
"i18next-fs-backend": "^2.0.0",
"i18next-http-backend": "^2.0.0",
"i18next-resources-to-backend": "^1.0.0",
"moment": "^2.29.4",
"mongoose": "^6.2.3",
"node-schedule": "^2.1.0",
"ts-node": "^10.7.0",
"tsconfig-paths": "^4.0.0",
"typescript": "^4.8.4",
"uuid": "^9.0.0",
"winston": "^3.8.2",
"winston-daily-rotate-file": "^4.6.1"
},
"devDependencies": {
"@types/chance": "1.1.3",
"@types/node-schedule": "2.1.0",
"@types/uuid": "8.3.4",
"@typescript-eslint/eslint-plugin": "5.41.0",
"@typescript-eslint/parser": "5.41.0",
"eslint": "8.26.0",
"eslint-config-airbnb-base": "15.0.0",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"eslint": "^8.26.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-no-loops": "0.3.0",
"eslint-plugin-prettier": "4.2.1",
"husky": "8.0.1",
"jest": "29.2.2",
"lint-staged": "13.0.3",
"nodemon": "2.0.20",
"prettier": "2.7.1",

View file

@ -1,5 +1,4 @@
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
// Modules
import moduleAudits from "./modules/audits";

View file

@ -1,5 +1,5 @@
import { ChannelType } from "discord-api-types/v10";
import {
ChannelType,
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,

View file

@ -1,8 +1,8 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import prisma from "../../../../handlers/database";
import deferReply from "../../../../handlers/deferReply";

View file

@ -1,8 +1,8 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import prisma from "../../../../handlers/database";
import deferReply from "../../../../handlers/deferReply";

View file

@ -2,9 +2,9 @@ import {
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import deferReply from "../../../../handlers/deferReply";
import checkPermission from "../../../../helpers/checkPermission";
import getValues from "./components/getValues";

View file

@ -1,8 +1,8 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import prisma from "../../../../handlers/database";
import deferReply from "../../../../handlers/deferReply";

View file

@ -1,8 +1,8 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import prisma from "../../../../handlers/database";
import deferReply from "../../../../handlers/deferReply";

View file

@ -1,9 +1,9 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { ChannelType } from "discord-api-types/v10";
import {
ChannelType,
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import prisma from "../../../../handlers/database";
import deferReply from "../../../../handlers/deferReply";

View file

@ -1,6 +1,5 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import Chance from "chance";
import { CommandInteraction } from "discord.js";
import { CommandInteraction, SlashCommandSubcommandBuilder } from "discord.js";
import prisma from "../../../../handlers/database";
import deferReply from "../../../../handlers/deferReply";

View file

@ -1,5 +1,4 @@
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
// Modules
import moduleLookup from "./modules/lookup";

View file

@ -1,6 +1,9 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import axios from "axios";
import { ChatInputCommandInteraction, EmbedBuilder } from "discord.js";
import {
ChatInputCommandInteraction,
EmbedBuilder,
SlashCommandSubcommandBuilder,
} from "discord.js";
import deferReply from "../../../../handlers/deferReply";
import getEmbedConfig from "../../../../helpers/getEmbedData";

View file

@ -1,5 +1,4 @@
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
import logger from "../../middlewares/logger";
// Modules

View file

@ -1,6 +1,9 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import axios from "axios";
import { CommandInteraction, EmbedBuilder } from "discord.js";
import {
CommandInteraction,
EmbedBuilder,
SlashCommandSubcommandBuilder
} from "discord.js";
import deferReply from "../../../../handlers/deferReply";
import getEmbedConfig from "../../../../helpers/getEmbedData";
import cooldown from "../../../../middlewares/cooldown";

View file

@ -1,6 +1,5 @@
//Dependencies
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
// Modules
import moduleCounters from "./modules/counters";

View file

@ -1,6 +1,8 @@
// Dependencies
import { SlashCommandSubcommandGroupBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import {
ChatInputCommandInteraction,
SlashCommandSubcommandGroupBuilder,
} from "discord.js";
// Modules
import moduleAdd from "./modules/add";

View file

@ -1,10 +1,10 @@
// Dependencies
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { ChannelType } from "discord-api-types/v10";
import {
ChannelType,
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import deferReply from "../../../../../../handlers/deferReply";
import checkPermission from "../../../../../../helpers/checkPermission";

View file

@ -1,11 +1,11 @@
// Dependencies
// Models
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { ChannelType } from "discord-api-types/v10";
import {
ChannelType,
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import deferReply from "../../../../../../handlers/deferReply";
import checkPermission from "../../../../../../helpers/checkPermission";

View file

@ -1,5 +1,7 @@
import { SlashCommandSubcommandGroupBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import {
ChatInputCommandInteraction,
SlashCommandSubcommandGroupBuilder,
} from "discord.js";
// Modules
import moduleGive from "./modules/give";

View file

@ -1,11 +1,17 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction, PermissionsBitField } from "discord.js";
// Dependencies
import {
ChatInputCommandInteraction, PermissionsBitField,
SlashCommandSubcommandBuilder
} from "discord.js";
// Configurations
// Helpers../../../../../../../helpers/userData
import pluralize from "../../../../../../helpers/pluralize";
// Models
// Handlers
import deferReply from "../../../../../../handlers/deferReply";
import { success as baseEmbedSuccess } from "../../../../../../helpers/baseEmbeds";
import checkPermission from "../../../../../../helpers/checkPermission";
import creditsGive from "../../../../../../helpers/credits/give";
import pluralize from "../../../../../../helpers/pluralize";
export default {
builder: (command: SlashCommandSubcommandBuilder) => {

View file

@ -1,13 +1,14 @@
// Dependencies
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import axios from "axios";
import { ButtonStyle, ChannelType } from "discord-api-types/v10";
import {
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
ChannelType,
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import { v4 as uuidv4 } from "uuid";
import encryption from "../../../../../../helpers/encryption";

View file

@ -1,7 +1,10 @@
// Dependencies
// Helpers
// Models
import {
ChatInputCommandInteraction,
PermissionsBitField,
SlashCommandSubcommandBuilder,
SlashCommandSubcommandBuilder
} from "discord.js";
import deferReply from "../../../../../../handlers/deferReply";

View file

@ -1,7 +1,9 @@
// Dependencies
// Models
import {
ChatInputCommandInteraction,
PermissionsBitField,
SlashCommandSubcommandBuilder,
SlashCommandSubcommandBuilder
} from "discord.js";
import deferReply from "../../../../../../handlers/deferReply";

View file

@ -1,10 +1,10 @@
// Dependencies
// Models
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import creditsTransfer from "../../../../../../helpers/credits/transfer";
// Configurations

View file

@ -1,5 +1,4 @@
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
// Modules
import modulePrune from "./modules/prune";

View file

@ -1,10 +1,10 @@
// Dependencies
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ChannelType,
ChatInputCommandInteraction,
EmbedBuilder,
PermissionsBitField,
SlashCommandSubcommandBuilder,
} from "discord.js";
import deferReply from "../../../../handlers/deferReply";
import checkPermission from "../../../../helpers/checkPermission";

View file

@ -1,6 +1,5 @@
// Dependencies
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
// Modules
import moduleGive from "./modules/give";

View file

@ -1,5 +1,8 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction, EmbedBuilder } from "discord.js";
import {
ChatInputCommandInteraction,
EmbedBuilder,
SlashCommandSubcommandBuilder
} from "discord.js";
import getEmbedConfig from "../../../../helpers/getEmbedData";
import logger from "../../../../middlewares/logger";
import noSelfReputation from "./components/noSelfReputation";

View file

@ -1,5 +1,8 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction, EmbedBuilder } from "discord.js";
import {
ChatInputCommandInteraction,
EmbedBuilder,
SlashCommandSubcommandBuilder,
} from "discord.js";
import prisma from "../../../../handlers/database";
import deferReply from "../../../../handlers/deferReply";
import getEmbedConfig from "../../../../helpers/getEmbedData";

View file

@ -1,6 +1,5 @@
// Dependencies
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
// Modules
import moduleCpgg from "./modules/cpgg";

View file

@ -1,4 +1,3 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import axios from "axios";
import {
ActionRowBuilder,
@ -7,6 +6,7 @@ import {
ChatInputCommandInteraction,
EmbedBuilder,
Message,
SlashCommandSubcommandBuilder,
} from "discord.js";
import { v4 as uuidv4 } from "uuid";
import prisma from "../../../../handlers/database";

View file

@ -1,6 +1,8 @@
// Dependencies
import { SlashCommandSubcommandGroupBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import {
ChatInputCommandInteraction,
SlashCommandSubcommandGroupBuilder,
} from "discord.js";
// Handlers

View file

@ -1,11 +1,11 @@
// Dependencies
// Helpers
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ChatInputCommandInteraction,
ColorResolvable,
EmbedBuilder,
GuildMemberRoleManager,
SlashCommandSubcommandBuilder,
} from "discord.js";
import deferReply from "../../../../../../handlers/deferReply";
import getEmbedData from "../../../../../../helpers/getEmbedData";

View file

@ -1,10 +1,10 @@
// Dependencies
// Helpers
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ChatInputCommandInteraction,
EmbedBuilder,
GuildMemberRoleManager,
SlashCommandSubcommandBuilder,
} from "discord.js";
// Configurations
// Models

View file

@ -1,5 +1,4 @@
import { SlashCommandBuilder } from "@discordjs/builders";
import { ChatInputCommandInteraction } from "discord.js";
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
// Modules
import moduleAbout from "./modules/about";

View file

@ -1,11 +1,11 @@
// Dependencies
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import {
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
CommandInteraction,
EmbedBuilder,
SlashCommandSubcommandBuilder,
} from "discord.js";
import deferReply from "../../../../handlers/deferReply";
// Configurations

View file

@ -1,5 +1,8 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { CommandInteraction, EmbedBuilder } from "discord.js";
import {
CommandInteraction,
EmbedBuilder,
SlashCommandSubcommandBuilder,
} from "discord.js";
import deferReply from "../../../../handlers/deferReply";
import getEmbedConfig from "../../../../helpers/getEmbedData";

View file

@ -1,6 +1,9 @@
// Dependencies
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { CommandInteraction, EmbedBuilder } from "discord.js";
import {
CommandInteraction,
EmbedBuilder,
SlashCommandSubcommandBuilder,
} from "discord.js";
// Configurations
import deferReply from "../../../../handlers/deferReply";
import getEmbedConfig from "../../../../helpers/getEmbedData";

View file

@ -1,5 +1,8 @@
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { CommandInteraction, EmbedBuilder } from "discord.js";
import {
CommandInteraction,
EmbedBuilder,
SlashCommandSubcommandBuilder,
} from "discord.js";
import deferReply from "../../../../handlers/deferReply";
import getEmbedConfig from "../../../../helpers/getEmbedData";

View file

@ -0,0 +1,38 @@
import { GuildMember } from "discord.js";
import db from "../../handlers/database";
export default async (guildMember: GuildMember) => {
const { guild, user } = guildMember;
return await db.guildMember.upsert({
where: {
userId_guildId: {
userId: user.id,
guildId: guild.id,
},
},
update: {},
create: {
user: {
connectOrCreate: {
create: {
id: user.id,
},
where: {
id: user.id,
},
},
},
guild: {
connectOrCreate: {
create: {
id: guild.id,
},
where: {
id: guild.id,
},
},
},
},
});
};

View file

@ -1,4 +1,4 @@
import { SlashCommandBuilder } from "@discordjs/builders";
import { SlashCommandBuilder } from "discord.js";
export interface ICommand {
builder: SlashCommandBuilder;

View file

@ -1,9 +0,0 @@
import { Snowflake } from "discord.js";
import { Document } from "mongoose";
export interface IShopRole extends Document {
guildId: Snowflake;
userId: Snowflake;
roleId: Snowflake;
lastPayed: Date;
}