Added eslintrc config and updated all files to it

This commit is contained in:
2023-11-22 23:50:21 +01:00
parent 10771fd04e
commit 3d4fc1fccb
70 changed files with 1276 additions and 1234 deletions

View File

@@ -1,21 +1,21 @@
const { userMention } = require('discord.js');
const { color, botLogChannel } = require('../../../config/options.json');
const { userMention } = require("discord.js")
const { color, botLogChannel } = require("../../../config/options.json")
module.exports = {
name: 'logNewJoins',
description: 'Logs new joins',
type: 'event',
event: 'guildMemberAdd',
name: "logNewJoins",
description: "Logs new joins",
type: "event",
event: "guildMemberAdd",
/** @param { import('discord.js').GuildMember } member */
execute(member) {
const channel = member.guild.channels.cache.get(botLogChannel);
const embedColor = Number(color.replace('#', '0x'));
const channel = member.guild.channels.cache.get(botLogChannel)
const embedColor = Number(color.replace("#", "0x"))
if (!channel) {
console.log(`[ERROR] Could not find channel used for new join logging.`);
return;
console.log("[ERROR] Could not find channel used for new join logging.")
return
}
channel.send({

View File

@@ -11,12 +11,12 @@ module.exports = {
console.log(interaction.user.username + "#" +
interaction.user.discriminator + " ran " +
interaction.commandName
);
)
} else if (interaction.isButton()) {
console.log(interaction.user.username + "#" +
interaction.user.discriminator + " clicked " +
interaction.customId
);
)
}
}
}

View File

@@ -1,14 +1,14 @@
module.exports = {
name: 'ur mom',
description: 'ur moms someone',
type: 'event',
event: 'messageCreate',
name: "ur mom",
description: "ur moms someone",
type: "event",
event: "messageCreate",
/** @param { import('discord.js').Message } message */
async execute(message) {
if (message.content.toLowerCase().includes('ur mom') && message.author.username === "taken.lua") {
message.react("Woot:734345936347725885");
if (message.content.toLowerCase().includes("ur mom") && message.author.username === "taken.lua") {
message.react("Woot:734345936347725885")
}
}
}

View File

@@ -1,11 +1,11 @@
module.exports = {
name: 'conolelog',
name: "conolelog",
description: "console log",
type: 'event',
event: 'ready',
type: "event",
event: "ready",
/** @param { import('discord.js').Client } client */
execute(client) {
console.log("Logged in as " + client.user.tag + "!");
console.log("Logged in as " + client.user.tag + "!")
}
}

View File

@@ -1,27 +1,27 @@
const { onlineLogChannel, color } = require('../../../config/options.json');
const { onlineLogChannel, color } = require("../../../config/options.json")
module.exports = {
name: 'sendonlinemessage',
name: "sendonlinemessage",
description: "send an online message",
type: 'event',
event: 'ready',
type: "event",
event: "ready",
execute(client) {
if (process.env.NODE_ENV === 'dev') return
if (process.env.NODE_ENV === "dev") return
const channel = client.channels.cache.get(onlineLogChannel);
const embedColor = Number(color.replace('#', '0x'))
const channel = client.channels.cache.get(onlineLogChannel)
const embedColor = Number(color.replace("#", "0x"))
if (!channel) {
console.log(`[ERROR] Could not find channel used for online message.`);
return;
console.log("[ERROR] Could not find channel used for online message.")
return
}
channel.send({
embeds: [{
description: `Bot is online!`,
description: "Bot is online!",
color: embedColor
}]
});
})
}
}

View File

@@ -1,10 +1,10 @@
const statuses = require('../../../config/statuses.json')
const statuses = require("../../../config/statuses.json")
module.exports = {
name: 'status',
description: 'Sets the status of the bot',
type: 'event',
event: 'ready',
name: "status",
description: "Sets the status of the bot",
type: "event",
event: "ready",
/** @param { import('discord.js').Client } client */
@@ -19,16 +19,16 @@ module.exports = {
client.user.setActivity(
{ name: statuses[0].name, type: 3}
);
)
let i = 0;
let i = 0
setInterval(() =>
client.user.setActivity(
statuses[i = 1, i++ % statuses.length]
),
1000 * 60 * 10
1000 * 60 * 10
)
client.user.setStatus('dnd');
client.user.setStatus("dnd")
}
}

View File

@@ -1,11 +1,11 @@
const { userMention, channelMention } = require('discord.js')
const { botLogChannel, color } = require('../../../config/options.json')
const { userMention, channelMention } = require("discord.js")
const { botLogChannel, color } = require("../../../config/options.json")
module.exports = {
name: 'vcJoinLeave',
description: 'Logs when a user joins or leaves a voice channel.',
type: 'event',
event: 'voiceStateUpdate',
name: "vcJoinLeave",
description: "Logs when a user joins or leaves a voice channel.",
type: "event",
event: "voiceStateUpdate",
/**
* @param { import('discord.js').VoiceState } oldState
@@ -18,10 +18,10 @@ module.exports = {
const guild = oldState.guild
const channel = guild.channels.cache.get(botLogChannel)
const embedColor = Number(color.replace('#', '0x'))
const embedColor = Number(color.replace("#", "0x"))
if (!channel) {
console.log(`[ERROR] Could not find channel used for voice channel join/leave logging.`)
console.log("[ERROR] Could not find channel used for voice channel join/leave logging.")
return
}