Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 17 additions & 29 deletions Commands/admin/reload.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,29 @@
import { SlashCommandBuilder } from 'discord.js';
import { ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import { loadCommands } from '../../Handlers/commandHandler';
import { loadEvents } from '../../Handlers/eventHandler';
import { DrippyClient } from '../../Utils/DrippyClient';

module.exports = {
developer: true,
data: new SlashCommandBuilder()
export const developer = true;

export const data = new SlashCommandBuilder()
.setName('reload')
.setDescription('Dev Only: Reload commands!')
//.setDefaultMemberPermissions(PermissionFlagsBits)
.addSubcommand((options) => options.setName('events').setDescription('Reload Events'))
.addSubcommand((options) => options.setName('commands').setDescription('Reload Commands')),
/**
*
* @param {ChatInputCommandInteraction} interaction
* @param {Client} client
*/
execute(interaction, client) {
const subCommand = interaction.options.getSubcommand();
.addSubcommand((options) => options.setName('commands').setDescription('Reload Commands'))

export function execute(interaction: ChatInputCommandInteraction, client: DrippyClient) {
const subCommand = interaction.options.getSubcommand();

switch(subCommand) {
case "events": {
/**
for(const [key,value] of client.events) {
client.removeListener(`${key}`, value, true);
}
*/
client.removeAllListeners()
interaction.reply({content: ' 🟢 **Events Reloaded**', ephemeral: true});
loadEvents(client);
}
switch(subCommand) {
case "events":
client.removeAllListeners()
interaction.reply({content: ' 🟢 **Events Reloaded**', ephemeral: true});
loadEvents(client);
break;
case "commands": {
loadCommands(client);
interaction.reply({content: ' 🟢 **Commands Reloaded**', ephemeral: true});
}
case "commands":
loadCommands(client);
interaction.reply({content: ' 🟢 **Commands Reloaded**', ephemeral: true});
break;
}
}

}
97 changes: 46 additions & 51 deletions Commands/general/apply.ts
Original file line number Diff line number Diff line change
@@ -1,53 +1,48 @@
const { SlashCommandBuilder, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
import { ChatInputCommandInteraction, SlashCommandBuilder, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js";
import { DrippyClient } from "../../Utils/DrippyClient";

module.exports = {
data: new SlashCommandBuilder()
export const data = new SlashCommandBuilder()
.setName('apply')
.setDescription('Apply for the rw role!'),
/**
*
* @param {ChatInputCommandInteraction} interaction
* @param {Client} client
*/
async execute(interaction, client) {
const modal = new ModalBuilder()
.setCustomId(`application`)
.setTitle(`RW Application`);

const finding = new TextInputBuilder()
.setCustomId(`finding`)
.setLabel(`How I found the IP`)
.setMaxLength(1024)
.setMinLength(100)
.setStyle(TextInputStyle.Paragraph)
.setPlaceholder(`Explain how you have found the IP of the LiveOverflow server!`)
.setRequired(true);

const challenges = new TextInputBuilder()
.setCustomId(`challenges`)
.setLabel(`Solved Challenges`)
.setMinLength(10)
.setMaxLength(1024)
.setStyle(TextInputStyle.Paragraph)
.setPlaceholder(`How and which challenges have you solved, if possible link a repo with your code`)
.setRequired(true);

const info = new TextInputBuilder()
.setCustomId(`info`)
.setLabel(`GUIDELINES`)
.setMinLength(1)
.setMaxLength(1230)
.setRequired(false)
.setStyle(TextInputStyle.Paragraph)
.setValue(` READ ME - THIS WILL NOT BE SUBMITTED\n\nThis command lets you apply for the rw role which lets you access solutions to problems and chat to others who have the same role\n\nYou must explain which problems you solved and how you solved them\nPlease do not apply immediately after joining the server.\n\n READ FROM TOP`)

const inforow = new ActionRowBuilder().addComponents(info);
const row1 = new ActionRowBuilder().addComponents(finding);
const row2 = new ActionRowBuilder().addComponents(challenges);

modal.addComponents(inforow, row1, row2);

await interaction.showModal(modal);
}

}
.setDescription('Apply for the rw role!')

export async function execute(interaction: ChatInputCommandInteraction, client: DrippyClient) {
const modal = new ModalBuilder()
.setCustomId(`application`)
.setTitle(`RW Application`);

const finding = new TextInputBuilder()
.setCustomId(`finding`)
.setLabel(`How I found the IP`)
.setMaxLength(1024)
.setMinLength(100)
.setStyle(TextInputStyle.Paragraph)
.setPlaceholder(`Explain how you have found the IP of the LiveOverflow server!`)
.setRequired(true);

const challenges = new TextInputBuilder()
.setCustomId(`challenges`)
.setLabel(`Solved Challenges`)
.setMinLength(10)
.setMaxLength(1024)
.setStyle(TextInputStyle.Paragraph)
.setPlaceholder(`How and which challenges have you solved, if possible link a repo with your code`)
.setRequired(true);

const info = new TextInputBuilder()
.setCustomId(`info`)
.setLabel(`GUIDELINES`)
.setMinLength(1)
.setMaxLength(1230)
.setRequired(false)
.setStyle(TextInputStyle.Paragraph)
.setValue(` READ ME - THIS WILL NOT BE SUBMITTED\n\nThis command lets you apply for the rw role which lets you access solutions to problems and chat to others who have the same role\n\nYou must explain which problems you solved and how you solved them\nPlease do not apply immediately after joining the server.\n\n READ FROM TOP`)

const inforow = new ActionRowBuilder().addComponents(info);
const row1 = new ActionRowBuilder().addComponents(finding);
const row2 = new ActionRowBuilder().addComponents(challenges);

//@ts-ignore
modal.addComponents(inforow, row1, row2);

await interaction.showModal(modal);
}
61 changes: 26 additions & 35 deletions Commands/general/check.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,35 @@
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction, User } from 'discord.js';
import { DrippyClient } from '../../Utils/DrippyClient';

module.exports = {
data: new SlashCommandBuilder()
export const data = new SlashCommandBuilder()
.setName('check')
.setDescription('Do you have the right ip? Check with this command')
.addStringOption((o) => o.setName(`ip`).setDescription(`Put the ip here (no port needed!)`).setRequired(true)),
/**
*
* @param {ChatInputCommandInteraction} interaction
* @param {Client} client
*/
execute(interaction, client) {
if(client.config.cooldown.enabled && client.cooldowns.includes(`${interaction.member.user.tag}`)) {
return interaction.reply({
content: ` 🔴 **Please wait! This command is on cooldown!**`,
ephemeral: true
})
}
.addStringOption((o) => o.setName(`ip`).setDescription(`Put the ip here (no port needed!)`).setRequired(true))

const ip = interaction.options.getString("ip")
const embed = new EmbedBuilder()
if(ip.includes(client.config.ips.main)) {
embed.setTitle("✅ Correct IP! Congrats!")
} else if(ip.includes(client.config.ips.n00b)) {
embed.setTitle("✅ N00bBot Proxy Found!")
} else {
embed.setTitle("❌ Incorrect IP! Keep searching!")
}
export function execute(interaction: ChatInputCommandInteraction, client: DrippyClient) {
const user = interaction.member?.user
if(!(user instanceof User)) return;

client.cooldowns = [...client.cooldowns, `${interaction.member.user.tag}`]
setTimeout(() => {
client.cooldowns = client.cooldowns.filter(function(v) {
return v !== `${interaction.member.user.tag}`;
});
}, client.config.cooldown.time * 1000)

interaction.reply({
embeds: [embed],
if(client.config.cooldown.enabled && client.cooldowns.includes(`${user.tag}`)) {
return interaction.reply({
content: ` 🔴 **Please wait! This command is on cooldown!**`,
ephemeral: true
})
}

}
const ip = interaction.options.getString("ip") || "null"
const embed = new EmbedBuilder()

embed.setTitle(`${ip.includes(client.config.ips.main) ? "✅ Correct IP! Congrats!" : ip.includes(client.config.ips.n00b) ? "✅ N00bBot Proxy Found!" : "❌ Incorrect IP! Keep searching!"}`)

client.cooldowns = [...client.cooldowns, `${user.tag}`]
setTimeout(() => {

client.cooldowns = client.cooldowns.filter((v) => v !== `${user.tag}`);
}, client.config.cooldown.time * 1000)

interaction.reply({
embeds: [embed],
ephemeral: true
})
}
57 changes: 26 additions & 31 deletions Commands/general/ping.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction } from 'discord.js';
import { DrippyClient } from '../../Utils/DrippyClient';

module.exports = {
data: new SlashCommandBuilder()
export const data = new SlashCommandBuilder()
.setName('ping')
.setDescription('A simple ping command!'),
/**
*
* @param {ChatInputCommandInteraction} interaction
* @param {Client} client
*/
async execute(interaction, client) {
const date = Date.now()
const embed = new EmbedBuilder()
.setTitle('🟢 Pong!')
.setDescription(`**< Ping >** \n${date - interaction.createdTimestamp}ms`)
.setColor('Green')
.setFooter({
text: `${client.config.name} - API Latency`
})
if(date - interaction.createdTimestamp > 90) {
embed.setColor('Orange')
embed.setTitle('🟠 Pong!')
} else if (date - interaction.createdTimestamp > 180) {
embed.setColor('Red')
embed.setTitle('🔴 Pong!')
}
.setDescription('A simple ping command!')

interaction.reply({
embeds: [embed],
ephemeral: true
})
}
export async function execute(interaction: ChatInputCommandInteraction, client: DrippyClient) {
const date = Date.now()
const embed = new EmbedBuilder()
.setTitle('🟢 Pong!')
.setDescription(`**< Ping >** \n${date - interaction.createdTimestamp}ms`)
.setColor('Green')
.setFooter({
text: `${client.config.name} - API Latency`
})

if(date - interaction.createdTimestamp > 90) {
embed.setColor('Orange')
embed.setTitle('🟠 Pong!')
} else if (date - interaction.createdTimestamp > 180) {
embed.setColor('Red')
embed.setTitle('🔴 Pong!')
}

}
interaction.reply({
embeds: [embed],
ephemeral: true
})
}
88 changes: 41 additions & 47 deletions Commands/general/status.ts
Original file line number Diff line number Diff line change
@@ -1,58 +1,52 @@
import { SlashCommandBuilder, EmbedBuilder, ActivityType } from 'discord.js';
import { SlashCommandBuilder, EmbedBuilder, ActivityType, ChatInputCommandInteraction } from 'discord.js';
import axios from 'axios';
import { DrippyClient } from '../../Utils/DrippyClient';

module.exports = {
data: new SlashCommandBuilder()
export const data = new SlashCommandBuilder()
.setName('status')
.setDescription('Check the server status!'),
/**
*
* @param {ChatInputCommandInteraction} interaction
* @param {Client} client
*/
async execute(interaction, client) {
await interaction.deferReply({
ephemeral: true
})
.setDescription('Check the server status!');

const embed = new EmbedBuilder()
const guild = await client.guilds.cache.find(g => g.id === client.config.guild.id)
const channel = await guild.channels.cache.find(c => c.id === client.config.guild.channels.statchan);
export async function execute(interaction: ChatInputCommandInteraction, client: DrippyClient) {
await interaction.deferReply({
ephemeral: true
})

try {
const ip = client.config.ips.main;
const url = `https://api.mcsrvstat.us/2/${ip}`;

const { data } = await axios.get(url);
const embed = new EmbedBuilder()
const guild = await client.guilds.cache.find(g => g.id === client.config.guild.id)
const channel = await guild?.channels.cache.find(c => c.id === client.config.guild.channels.statchan);

if (!data.online) {
client.user.setStatus('dnd');
client.user.setActivity(`OFFLINE`, {type: ActivityType.Playing});
channel.setName(`🔴 OFFLINE`)
embed.setColor(`Red`)
embed.setTitle(`LiveOverflow SMP • OFFLINE`)
embed.setDescription(`The server is currently offline`)
try {
const ip = client.config.ips.main;
const url = `https://api.mcsrvstat.us/2/${ip}`;

const { data } = await axios.get(url);

if (!data.online) {
client.user?.setStatus('dnd');
client.user?.setActivity(`OFFLINE`, {type: ActivityType.Playing});
channel?.setName(`🔴 OFFLINE`)
embed.setColor(`Red`)
embed.setTitle(`LiveOverflow SMP • OFFLINE`)
embed.setDescription(`The server is currently offline`)
} else {
client.user?.setActivity(`${data.players.online}/${data.players.max} players`, { type: ActivityType.Watching });
embed.setTitle(`LiveOverflow SMP • ${data.players.online}/${data.players.max}`)
embed.setDescription(`Current server status`)
if(data.players.online >= data.players.max) {
channel?.setName(`🟠 ${data.players.online}/${data.players.max} Players`)
client.user?.setStatus('idle');
embed.setColor(`Orange`)
} else {
client.user.setActivity(`${data.players.online}/${data.players.max} players`, { type: ActivityType.Watching });
embed.setTitle(`LiveOverflow SMP • ${data.players.online}/${data.players.max}`)
embed.setDescription(`Current server status`)
if(data.players.online >= data.players.max) {
channel.setName(`🟠 ${data.players.online}/${data.players.max} Players`)
client.user.setStatus('idle');
embed.setColor(`Orange`)
} else {
channel.setName(`🟢 ${data.players.online}/${data.players.max} Players`)
client.user.setStatus('online');
embed.setColor(`Green`)
}
channel?.setName(`🟢 ${data.players.online}/${data.players.max} Players`)
client.user?.setStatus('online');
embed.setColor(`Green`)
}
} catch(error) {
console.error(error)
}

interaction.editReply({
embeds: [embed],
})
} catch(error) {
console.error(error)
}

}
interaction.editReply({
embeds: [embed],
})
}
Loading