Fix changes requested
This commit is contained in:
parent
508f8228b1
commit
ae85233ae0
7 changed files with 23 additions and 35 deletions
|
@ -13,12 +13,13 @@
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitea.vylpes.xyz/rabbitlabs/vylbot-app"
|
"url": "https://github.com/Vylpes/vylbot-app"
|
||||||
},
|
},
|
||||||
"author": "Vylpes",
|
"author": "Vylpes",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": "https://gitea.vylpes.xyz/rabbitlabs/vylbot-app/issues",
|
"bugs": "https://github.com/Vylpes/vylbot-app/issues",
|
||||||
"homepage": "https://gitea.vylpes.xyz/rabbitlabs/vylbot-app",
|
"homepage": "https://github.com/Vylpes/vylbot-app",
|
||||||
|
"funding": "https://ko-fi.com/vylpes",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/jest": "^27.0.3",
|
"@types/jest": "^27.0.3",
|
||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Emoji, MessageActionRow, MessageButton } from "discord.js";
|
import { MessageActionRow, MessageButton } from "discord.js";
|
||||||
import { MessageButtonStyles } from "discord.js/typings/enums";
|
import { MessageButtonStyles } from "discord.js/typings/enums";
|
||||||
import { ICommandContext } from "../contracts/ICommandContext";
|
import { ICommandContext } from "../contracts/ICommandContext";
|
||||||
import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
||||||
|
@ -22,11 +22,19 @@ export default class About extends Command {
|
||||||
const row = new MessageActionRow();
|
const row = new MessageActionRow();
|
||||||
|
|
||||||
if (repoLink) {
|
if (repoLink) {
|
||||||
row.addComponents(new MessageButton().setURL(repoLink).setLabel("Repo").setStyle(MessageButtonStyles.LINK));
|
row.addComponents(
|
||||||
|
new MessageButton()
|
||||||
|
.setURL(repoLink)
|
||||||
|
.setLabel("Repo")
|
||||||
|
.setStyle(MessageButtonStyles.LINK));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fundingLink) {
|
if (fundingLink) {
|
||||||
row.addComponents(new MessageButton().setURL(fundingLink).setLabel("Funding").setStyle(MessageButtonStyles.LINK));
|
row.addComponents(
|
||||||
|
new MessageButton()
|
||||||
|
.setURL(fundingLink)
|
||||||
|
.setLabel("Funding")
|
||||||
|
.setStyle(MessageButtonStyles.LINK));
|
||||||
}
|
}
|
||||||
|
|
||||||
await embed.SendToCurrentChannel({ components: [row] });
|
await embed.SendToCurrentChannel({ components: [row] });
|
||||||
|
|
|
@ -7,7 +7,6 @@ import { ICommandContext } from "../contracts/ICommandContext";
|
||||||
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
||||||
import Audit from "../entity/Audit";
|
import Audit from "../entity/Audit";
|
||||||
import { AuditType } from "../constants/AuditType";
|
import { AuditType } from "../constants/AuditType";
|
||||||
import Server from "../entity/Server";
|
|
||||||
|
|
||||||
export default class Ban extends Command {
|
export default class Ban extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -79,14 +78,10 @@ export default class Ban extends Command {
|
||||||
await publicEmbed.SendToCurrentChannel();
|
await publicEmbed.SendToCurrentChannel();
|
||||||
|
|
||||||
if (context.message.guild) {
|
if (context.message.guild) {
|
||||||
const server = await Server.FetchOneById(Server, context.message.guild.id);
|
|
||||||
|
|
||||||
if (server) {
|
|
||||||
const audit = new Audit(targetUser.id, AuditType.Ban, reason, context.message.author.id, context.message.guild.id);
|
const audit = new Audit(targetUser.id, AuditType.Ban, reason, context.message.author.id, context.message.guild.id);
|
||||||
|
|
||||||
await audit.Save(Audit, audit);
|
await audit.Save(Audit, audit);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
commandContext: context,
|
commandContext: context,
|
||||||
|
|
|
@ -3,7 +3,6 @@ import ErrorMessages from "../constants/ErrorMessages";
|
||||||
import { ICommandContext } from "../contracts/ICommandContext";
|
import { ICommandContext } from "../contracts/ICommandContext";
|
||||||
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
||||||
import Audit from "../entity/Audit";
|
import Audit from "../entity/Audit";
|
||||||
import Server from "../entity/Server";
|
|
||||||
import ErrorEmbed from "../helpers/embeds/ErrorEmbed";
|
import ErrorEmbed from "../helpers/embeds/ErrorEmbed";
|
||||||
import LogEmbed from "../helpers/embeds/LogEmbed";
|
import LogEmbed from "../helpers/embeds/LogEmbed";
|
||||||
import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
||||||
|
@ -79,14 +78,10 @@ export default class Kick extends Command {
|
||||||
await publicEmbed.SendToCurrentChannel();
|
await publicEmbed.SendToCurrentChannel();
|
||||||
|
|
||||||
if (context.message.guild) {
|
if (context.message.guild) {
|
||||||
const server = await Server.FetchOneById(Server, context.message.guild.id);
|
|
||||||
|
|
||||||
if (server) {
|
|
||||||
const audit = new Audit(targetUser.id, AuditType.Kick, reason, context.message.author.id, context.message.guild.id);
|
const audit = new Audit(targetUser.id, AuditType.Kick, reason, context.message.author.id, context.message.guild.id);
|
||||||
|
|
||||||
await audit.Save(Audit, audit);
|
await audit.Save(Audit, audit);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
commandContext: context,
|
commandContext: context,
|
||||||
|
|
|
@ -3,7 +3,6 @@ import ErrorMessages from "../constants/ErrorMessages";
|
||||||
import { ICommandContext } from "../contracts/ICommandContext";
|
import { ICommandContext } from "../contracts/ICommandContext";
|
||||||
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
||||||
import Audit from "../entity/Audit";
|
import Audit from "../entity/Audit";
|
||||||
import Server from "../entity/Server";
|
|
||||||
import ErrorEmbed from "../helpers/embeds/ErrorEmbed";
|
import ErrorEmbed from "../helpers/embeds/ErrorEmbed";
|
||||||
import LogEmbed from "../helpers/embeds/LogEmbed";
|
import LogEmbed from "../helpers/embeds/LogEmbed";
|
||||||
import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
||||||
|
@ -92,14 +91,10 @@ export default class Mute extends Command {
|
||||||
await publicEmbed.SendToCurrentChannel();
|
await publicEmbed.SendToCurrentChannel();
|
||||||
|
|
||||||
if (context.message.guild) {
|
if (context.message.guild) {
|
||||||
const server = await Server.FetchOneById(Server, context.message.guild.id);
|
|
||||||
|
|
||||||
if (server) {
|
|
||||||
const audit = new Audit(targetUser.id, AuditType.Mute, reason, context.message.author.id, context.message.guild.id);
|
const audit = new Audit(targetUser.id, AuditType.Mute, reason, context.message.author.id, context.message.guild.id);
|
||||||
|
|
||||||
await audit.Save(Audit, audit);
|
await audit.Save(Audit, audit);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
commandContext: context,
|
commandContext: context,
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { AuditType } from "../constants/AuditType";
|
||||||
import { ICommandContext } from "../contracts/ICommandContext";
|
import { ICommandContext } from "../contracts/ICommandContext";
|
||||||
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
||||||
import Audit from "../entity/Audit";
|
import Audit from "../entity/Audit";
|
||||||
import Server from "../entity/Server";
|
|
||||||
import ErrorEmbed from "../helpers/embeds/ErrorEmbed";
|
import ErrorEmbed from "../helpers/embeds/ErrorEmbed";
|
||||||
import LogEmbed from "../helpers/embeds/LogEmbed";
|
import LogEmbed from "../helpers/embeds/LogEmbed";
|
||||||
import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
||||||
|
@ -67,14 +66,10 @@ export default class Warn extends Command {
|
||||||
await publicEmbed.SendToCurrentChannel();
|
await publicEmbed.SendToCurrentChannel();
|
||||||
|
|
||||||
if (context.message.guild) {
|
if (context.message.guild) {
|
||||||
const server = await Server.FetchOneById(Server, context.message.guild.id);
|
|
||||||
|
|
||||||
if (server) {
|
|
||||||
const audit = new Audit(user.id, AuditType.Warn, reason, context.message.author.id, context.message.guild.id);
|
const audit = new Audit(user.id, AuditType.Warn, reason, context.message.author.id, context.message.guild.id);
|
||||||
|
|
||||||
await audit.Save(Audit, audit);
|
await audit.Save(Audit, audit);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
commandContext: context,
|
commandContext: context,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Entity, OneToMany } from "typeorm";
|
import { Entity, OneToMany } from "typeorm";
|
||||||
import BaseEntity from "../contracts/BaseEntity";
|
import BaseEntity from "../contracts/BaseEntity";
|
||||||
import Audit from "./Audit";
|
|
||||||
import Role from "./Role";
|
import Role from "./Role";
|
||||||
import Setting from "./Setting";
|
import Setting from "./Setting";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue