thaldrin/DiscordEvents/ShortlinkMessage.js
2019-10-14 13:19:41 +02:00

21 lines
585 B
JavaScript
Executable file

const { log, db } = require("../utils/index");
const { ShortLinks } = require("../utils");
const { table } = require("quick.db");
const Servers = new table("servers");
const Users = new table("users");
const Backend = new table("backend");
module.exports = {
name: "message",
run: async (client, Message) => {
if (Message.author.bot) return;
let Server = Servers.get(Message.guild.id);
let Enabled;
if (Server === null) {
Enabled = db.defaults.server.Shortlinks;
} else {
Enabled = Server.Shortlinks;
}
ShortLinks(Enabled, Message);
}
};