Feature/81 slash command support ()

* Update discord.js

* Migrate to slash commands

* Clean up imports

* Update permissions

* Fix guild-specific commands not showing up

* Fix changes requested
This commit is contained in:
Vylpes 2022-09-18 11:57:22 +01:00 committed by GitHub
parent 0465697b87
commit ed8f5927c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 1469 additions and 1850 deletions
src/entity

View file

@ -1,4 +1,4 @@
import { Column, Entity, getConnection, ManyToOne } from "typeorm";
import { Column, Entity, getConnection } from "typeorm";
import { AuditType } from "../constants/AuditType";
import BaseEntity from "../contracts/BaseEntity";
import StringTools from "../helpers/StringTools";

View file

@ -1,4 +1,4 @@
import { Column, Entity, EntityTarget, getConnection, ManyToOne } from "typeorm";
import { Column, Entity, getConnection, ManyToOne } from "typeorm";
import BaseEntity from "../contracts/BaseEntity"
import Server from "./Server";
@ -15,6 +15,10 @@ export default class Role extends BaseEntity {
@ManyToOne(() => Server, x => x.Roles)
Server: Server;
public SetServer(server: Server) {
this.Server = server;
}
public static async FetchOneByRoleId(roleId: string, relations?: string[]): Promise<Role | undefined> {
const connection = getConnection();