3001.31 update for everyone

This commit is contained in:
Histmy 2021-11-16 19:02:17 +01:00
parent 1297ef467e
commit 33d4d9ef87
3 changed files with 11 additions and 5 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.30.1", "version": "3001.31.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.30.1", "version": "3001.31.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@discordjs/opus": "github:discordjs/opus", "@discordjs/opus": "github:discordjs/opus",

View File

@ -1,6 +1,6 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.30.1", "version": "3001.31.0",
"description": "Toto je velmi kvalitní bot.", "description": "Toto je velmi kvalitní bot.",
"repository": { "repository": {
"url": "https://github.com/Histmy/Denim-Bot/" "url": "https://github.com/Histmy/Denim-Bot/"

View File

@ -5,6 +5,7 @@ import { Client, Message } from "discord.js";
import { emouty } from "../utils/emotes"; import { emouty } from "../utils/emotes";
import { createServer } from "http"; import { createServer } from "http";
import { Modul } from "../utils/types"; import { Modul } from "../utils/types";
import fetch from "node-fetch";
let spim = false; let spim = false;
@ -16,8 +17,13 @@ const exp: Modul = {
return "je to v konzoli"; return "je to v konzoli";
}, },
update: (mes) => { update: async (mes) => {
if (mes.channel.id != process.env.adminChannel && mes.author.id != process.env.adminID) return "nato nemas prava kokote"; const sudo = mes.channel.id == process.env.adminChannel || mes.author.id == process.env.adminID;
if (!sudo) {
const verze = await fetch("https://denim3001.deadfish.cz/version.txt")
.then(r => r.text());
if (verze == require("../../package.json").version) return `ale ja se nemam co priucit vole kkte ${mes.author}`;
}
getVoiceConnections().forEach(con => con.disconnect()); getVoiceConnections().forEach(con => con.disconnect());
const client: Client = module.exports.client; const client: Client = module.exports.client;