fixing stupid bugs

This commit is contained in:
codepupper 2019-11-13 22:12:14 +01:00
parent 7022efebb8
commit 54fff51e97
17 changed files with 124 additions and 121 deletions

View file

@ -54,12 +54,15 @@ module.exports = {
client.cooldowns.set(cmd.name, new Collection());
}
if (ctx.isDeveloper) {
cmd.AuthorPermissions = 'NONE';
}
if (cmd.guildOnly && !msg.guild) return;
if (cmd.nsfw && !ctx.channel.nsfw)
return ctx.send('This channel is not marked as NSFW, please mark it as such and rerun this command.');
if (cmd.developerOnly && !client.config.developers.find((dev) => msg.author.id == dev.id)) return;
if (cmd.AuthorPermissions !== 'NONE' && !ctx.member.permissions.has(cmd.AuthorPermissions)) {
return ctx.send(`You need \`${cmd.AuthorPermissions}\` Permission(s) to run this Command`);
return ctx.send(`You need the \`${cmd.AuthorPermissions}\` Permission(s) to run this Command`);
}
const now = Date.now();
const timestamps = client.cooldowns.get(cmd.name);
@ -90,6 +93,8 @@ module.exports = {
cmd.name + ' | ' + err.message,
`Full Error:
${err}
Content: ${ctx.msg.content}
Author: ${msg.author.tag} (${msg.author.id})
Server: ${msg.guild.name} (${msg.guild.id})`,

View file

@ -1,12 +1,11 @@
const {
log
} = require('../utils');
const { log } = require('../utils');
const config = require('../config');
const blapi = require('blapi');
//blapi.setLogging(true);
function randomStatus(client) {
const States = [{
const States = [
{
activity: {
name: 'server fans whirr 💨',
type: 'LISTENING'
@ -15,20 +14,18 @@ function randomStatus(client) {
},
{
activity: {
name: "my master's keyboard -w-",
name: 'True Damage - GIANTS',
type: 'LISTENING'
},
status: 'online'
},
{
activity: {
name: client.guilds.size + ' Servers -w-',
name: `${client.guilds.size} Servers -w-`,
type: 'WATCHING'
},
status: 'online'
},
// { game: { name: `${client.users.get('318044130796109825').username} dance~`, type: 'WATCHING' }, status: 'dnd' },
// { game: { name: thal.users.size + ' Wolves', type: 'WATCHING' }, status: 'dnd' },
{
activity: {
name: 'Δ & ♫',
@ -36,13 +33,6 @@ function randomStatus(client) {
},
status: 'online'
},
{
activity: {
name: 'True Damage - GIANTS',
type: 'LISTENING'
},
status: 'online'
},
{
activity: {
name: `'help | thaldr.in`,
@ -59,11 +49,13 @@ function randomStatus(client) {
module.exports = {
name: 'ready',
run: async (client) => {
blapi.handle(client, config.apis);
if (client.user.id === '434662676547764244') {
blapi.handle(client, config.apis);
}
log.hasStarted();
randomStatus(client);
setInterval(() => {
randomStatus(client);
}, 60000);
}
};
};