Moved Assets to Subdir, Migrated some old commands
|
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 242 KiB |
|
Before Width: | Height: | Size: 914 KiB After Width: | Height: | Size: 914 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 411 KiB After Width: | Height: | Size: 411 KiB |
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 371 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 536 KiB After Width: | Height: | Size: 536 KiB |
@@ -13,7 +13,7 @@ module.exports = {
|
|||||||
let content = `Du kannst wieder nussen! :)`
|
let content = `Du kannst wieder nussen! :)`
|
||||||
let thumbnail = 'https://cdn-icons-png.flaticon.com/512/7451/7451659.png'
|
let thumbnail = 'https://cdn-icons-png.flaticon.com/512/7451/7451659.png'
|
||||||
let title = 'Go Nuts!'
|
let title = 'Go Nuts!'
|
||||||
if (cooldown > 0) {
|
if (cooldown) {
|
||||||
content = `<t:${cooldown.cooldown}:R> kannst du wieder nussen! ;)`
|
content = `<t:${cooldown.cooldown}:R> kannst du wieder nussen! ;)`
|
||||||
thumbnail = 'https://cdn.discordapp.com/attachments/1152723542836772914/1152987472788193361/No-nuts-PhotoRoom.png-PhotoRoom.png'
|
thumbnail = 'https://cdn.discordapp.com/attachments/1152723542836772914/1152987472788193361/No-nuts-PhotoRoom.png-PhotoRoom.png'
|
||||||
title = 'To Nut or Not to Nut...'
|
title = 'To Nut or Not to Nut...'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ module.exports = {
|
|||||||
|
|
||||||
const cdData = await cdColl.findOne({ userID: message.author.id })
|
const cdData = await cdColl.findOne({ userID: message.author.id })
|
||||||
|
|
||||||
if (!cdData || cdData.cooldown < Date.now() / 1000) {
|
if (!cdData || cdData.cooldown < (Date.now() / 1000)) {
|
||||||
let cd = Math.floor((Date.now() + 3600000) / 1000)
|
let cd = Math.floor((Date.now() + 3600000) / 1000)
|
||||||
await cdColl.findOneAndUpdate({
|
await cdColl.findOneAndUpdate({
|
||||||
userID: message.author.id
|
userID: message.author.id
|
||||||
@@ -40,7 +40,7 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return await message.reply({
|
return await message.reply({
|
||||||
content: `Du kannst erst <t:${Math.floor(cdData?.cooldown / 1000)}:R> wieder nussen :(`,
|
content: `Du kannst erst <t:${Math.floor(cdData?.cooldown)}:R> wieder nussen :(`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { EmbedBuilder, MessageFlags } = require('discord.js')
|
const { EmbedBuilder } = require('discord.js')
|
||||||
const { mClient } = require('../../../index')
|
const { mClient } = require('../../../index')
|
||||||
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
@@ -58,7 +58,7 @@ module.exports = {
|
|||||||
if (yourBalance.nuts < amount) {
|
if (yourBalance.nuts < amount) {
|
||||||
return await message.reply({
|
return await message.reply({
|
||||||
content: 'Du kannst nicht mehr geben als du hast!',
|
content: 'Du kannst nicht mehr geben als du hast!',
|
||||||
flags: MessageFlags.Ephemeral
|
ephemeral: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
var content = `Du sendest **${amount}** Nüsse an <@${target.id}>`
|
var content = `Du sendest **${amount}** Nüsse an <@${target.id}>`
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setTitle('Nuts Leaderboard')
|
.setTitle('Nuts Leaderboard')
|
||||||
.setThumbnail(message.guild.iconURL({ dynamic: true}))
|
.setThumbnail('https://cdn.discordapp.com/attachments/1152723542836772914/1152940755539722240/pngwing.com.png')
|
||||||
.setDescription(fields.toString())
|
.setDescription(fields.toString())
|
||||||
.setColor('#5865F2') // Discord's blurple color
|
.setColor('#5865F2') // Discord's blurple color
|
||||||
.setFooter({ text: 'Use ◄ ► to navigate' });
|
.setFooter({ text: 'Use ◄ ► to navigate' });
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
const { EmbedBuilder } = require('discord.js')
|
|
||||||
const { mClient } = require('../../../index')
|
|
||||||
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
|
||||||
require('dotenv').config()
|
|
||||||
module.exports = {
|
|
||||||
name: 'nutsstats',
|
|
||||||
description: 'shows nuts statistic',
|
|
||||||
aliases: ['nstat', 'ns'],
|
|
||||||
async execute(message, args) {
|
|
||||||
const db = mClient.db(process.env.M_DB)
|
|
||||||
const nStatsColl = db.collection('stats_nuts')
|
|
||||||
const stats = await nStatsColl.find({}).sort({ amount: 1 }).toArray()
|
|
||||||
let nutMin = {
|
|
||||||
count: 0,
|
|
||||||
amount: 0
|
|
||||||
}
|
|
||||||
let nutMax = {
|
|
||||||
count: 0,
|
|
||||||
amount: 0
|
|
||||||
}
|
|
||||||
let totalNuts = 0
|
|
||||||
let totalCount = 0
|
|
||||||
stats.forEach(stat => {
|
|
||||||
totalCount += stat.count
|
|
||||||
totalNuts += (stat.count * stat.amount)
|
|
||||||
if (nutMin.count > stat.count) { nutMin = stat }
|
|
||||||
if (nutMax.count < stat.count) { nutMax = stat }
|
|
||||||
})
|
|
||||||
let nutAvg = totalNuts / totalCount
|
|
||||||
const embed = new EmbedBuilder()
|
|
||||||
.setTitle("Nut Statistic")
|
|
||||||
.setDescription(
|
|
||||||
`Total Nut Actions: **${totalCount}**\r\n
|
|
||||||
Total Nuts nutted: **${totalNuts}**\r\n
|
|
||||||
Nut Average: **${nutAvg.toFixed(3)}**\r\n
|
|
||||||
Best Nut: **${nutMax.amount}**\r\n
|
|
||||||
Worst Nut: **${nutMin.amount}**`
|
|
||||||
)
|
|
||||||
.addFields(
|
|
||||||
{ name: '[0]', value: `x${stats[0].count}`, inline: true },
|
|
||||||
{ name: '[1]', value: `x${stats[1].count}`, inline: true },
|
|
||||||
{ name: '[2]', value: `x${stats[2].count}`, inline: true },
|
|
||||||
{ name: '[3]', value: `x${stats[3].count}`, inline: true },
|
|
||||||
{ name: '[4]', value: `x${stats[4].count}`, inline: true },
|
|
||||||
{ name: '[5]', value: `x${stats[5].count}`, inline: true },
|
|
||||||
{ name: '[6]', value: `x${stats[6].count}`, inline: true },
|
|
||||||
{ name: '[7]', value: `x${stats[7].count}`, inline: true },
|
|
||||||
{ name: '[8]', value: `x${stats[8].count}`, inline: true },
|
|
||||||
{ name: '[9]', value: `x${stats[9].count}`, inline: true }
|
|
||||||
)
|
|
||||||
.setColor(0x51267)
|
|
||||||
.setTimestamp()
|
|
||||||
.setThumbnail(message.guild.iconURL())
|
|
||||||
await message.reply({
|
|
||||||
embeds: [embed]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,7 @@ function isValidDate(day, month) {
|
|||||||
// Define the number of days in each month
|
// Define the number of days in each month
|
||||||
const daysInMonth = {
|
const daysInMonth = {
|
||||||
1: 31, // January
|
1: 31, // January
|
||||||
2: 28, // February (ignore leap years)
|
2: 28, // February (fuck leap years, me an' the homies hate that)
|
||||||
3: 31, // March
|
3: 31, // March
|
||||||
4: 30, // April
|
4: 30, // April
|
||||||
5: 31, // May
|
5: 31, // May
|
||||||
@@ -32,7 +32,22 @@ function isValidDate(day, month) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
async function birthdayAdd(interaction) {
|
function getNextBirthdayTimestamp(day, month) {
|
||||||
|
const now = new Date();
|
||||||
|
now.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const currentYear = now.getFullYear();
|
||||||
|
|
||||||
|
let nextBirthday = new Date(currentYear, month - 1, day);
|
||||||
|
|
||||||
|
// If birthday already passed this year → next year
|
||||||
|
if (nextBirthday < now) {
|
||||||
|
nextBirthday.setFullYear(currentYear + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Math.floor(nextBirthday.getTime() / 1000); // Unix timestamp
|
||||||
|
}
|
||||||
|
async function birthdaySet(interaction) {
|
||||||
let target = await interaction.options.getUser('user')
|
let target = await interaction.options.getUser('user')
|
||||||
let day = await interaction.options.getNumber('day')
|
let day = await interaction.options.getNumber('day')
|
||||||
let month = await interaction.options.getNumber('month')
|
let month = await interaction.options.getNumber('month')
|
||||||
@@ -90,49 +105,6 @@ async function birthdayDelete(interaction) {
|
|||||||
return interaction.reply({ content: "There was an issue!" })
|
return interaction.reply({ content: "There was an issue!" })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function birthdayEdit(interaction) {
|
|
||||||
let target = await interaction.options.getUser('user')
|
|
||||||
let day = await interaction.options.getNumber('day')
|
|
||||||
let month = await interaction.options.getNumber('month')
|
|
||||||
|
|
||||||
|
|
||||||
if (!isValidDate(day, month)) {
|
|
||||||
return interaction.reply({ content: "Invalid Date", flags: MessageFlags.Ephemeral })
|
|
||||||
}
|
|
||||||
|
|
||||||
const db = mClient.db(process.env.M_DB)
|
|
||||||
const bdayColl = db.collection('items_birthdays')
|
|
||||||
|
|
||||||
const found = await bdayColl.findOne({ userID: target.id })
|
|
||||||
if (!found) {
|
|
||||||
return interaction.reply({ content: "Not yet in Database", flags: MessageFlags.Ephemeral })
|
|
||||||
}
|
|
||||||
|
|
||||||
const data = {
|
|
||||||
guildID: interaction.guild.id,
|
|
||||||
userID: target.id,
|
|
||||||
day: day,
|
|
||||||
month: month
|
|
||||||
}
|
|
||||||
|
|
||||||
const res = await bdayColl.findOneAndUpdate({ userID: target.id }, { $set: data }, { upsert: true })
|
|
||||||
return interaction.reply({ content: "Birthday edited successfully!" })
|
|
||||||
}
|
|
||||||
async function makeTimestamp(day, month, year) {
|
|
||||||
const date = new Date(year, month - 1, day);
|
|
||||||
const unixTimestamp = Math.floor(date.getTime() / 1000);
|
|
||||||
return unixTimestamp
|
|
||||||
}
|
|
||||||
function isToday(day, month) {
|
|
||||||
const currentYear = new Date().getFullYear();
|
|
||||||
const inputDate = new Date(currentYear, month - 1, day);
|
|
||||||
const today = new Date();
|
|
||||||
return (
|
|
||||||
inputDate.getDate() === today.getDate() &&
|
|
||||||
inputDate.getMonth() === today.getMonth() &&
|
|
||||||
inputDate.getFullYear() === today.getFullYear()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async function birthdayGet(interaction) {
|
async function birthdayGet(interaction) {
|
||||||
const target = await interaction.options.getUser('user');
|
const target = await interaction.options.getUser('user');
|
||||||
const db = mClient.db(process.env.M_DB);
|
const db = mClient.db(process.env.M_DB);
|
||||||
@@ -141,7 +113,7 @@ async function birthdayGet(interaction) {
|
|||||||
const found = await bdayColl.findOne({ userID: target.id });
|
const found = await bdayColl.findOne({ userID: target.id });
|
||||||
if (!found) {
|
if (!found) {
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
content: "Not in Database!",
|
content: "Date not in Database!",
|
||||||
flags: MessageFlags.Ephemeral
|
flags: MessageFlags.Ephemeral
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -167,21 +139,6 @@ async function birthdayGet(interaction) {
|
|||||||
|
|
||||||
await interaction.reply({ embeds: [embed] });
|
await interaction.reply({ embeds: [embed] });
|
||||||
}
|
}
|
||||||
function getNextBirthdayTimestamp(day, month) {
|
|
||||||
const now = new Date();
|
|
||||||
now.setHours(0, 0, 0, 0);
|
|
||||||
|
|
||||||
const currentYear = now.getFullYear();
|
|
||||||
|
|
||||||
let nextBirthday = new Date(currentYear, month - 1, day);
|
|
||||||
|
|
||||||
// If birthday already passed this year → next year
|
|
||||||
if (nextBirthday < now) {
|
|
||||||
nextBirthday.setFullYear(currentYear + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Math.floor(nextBirthday.getTime() / 1000); // Unix timestamp
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
@@ -189,8 +146,8 @@ module.exports = {
|
|||||||
.setDescription('manage birthdays')
|
.setDescription('manage birthdays')
|
||||||
.addSubcommand(s =>
|
.addSubcommand(s =>
|
||||||
s
|
s
|
||||||
.setName('add')
|
.setName('set')
|
||||||
.setDescription('adds a birthday')
|
.setDescription('set date to birthday')
|
||||||
.addUserOption((option) =>
|
.addUserOption((option) =>
|
||||||
option
|
option
|
||||||
.setName('user')
|
.setName('user')
|
||||||
@@ -219,16 +176,6 @@ module.exports = {
|
|||||||
option.setName('user').setDescription('user'))
|
option.setName('user').setDescription('user'))
|
||||||
.addStringOption((option) =>
|
.addStringOption((option) =>
|
||||||
option.setName('id').setDescription('ID')))
|
option.setName('id').setDescription('ID')))
|
||||||
.addSubcommand(s =>
|
|
||||||
s
|
|
||||||
.setName('edit')
|
|
||||||
.setDescription('edits a birthday')
|
|
||||||
.addUserOption((option) =>
|
|
||||||
option.setName('user').setDescription('user').setRequired(true))
|
|
||||||
.addNumberOption((option) =>
|
|
||||||
option.setName('day').setDescription('day').setRequired(true))
|
|
||||||
.addNumberOption((option) =>
|
|
||||||
option.setName('month').setDescription('month').setRequired(true)))
|
|
||||||
.addSubcommand(s =>
|
.addSubcommand(s =>
|
||||||
s
|
s
|
||||||
.setName('get')
|
.setName('get')
|
||||||
@@ -237,14 +184,14 @@ module.exports = {
|
|||||||
option.setName('user').setDescription('user').setRequired(true))),
|
option.setName('user').setDescription('user').setRequired(true))),
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
switch (interaction.options._subcommand) {
|
switch (interaction.options._subcommand) {
|
||||||
case 'add':
|
case 'set':
|
||||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
||||||
return await interaction.reply({
|
return await interaction.reply({
|
||||||
content: "Unprivileged Access!",
|
content: "Unprivileged Access!",
|
||||||
flags: MessageFlags.Ephemeral
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
birthdayAdd(interaction)
|
birthdaySet(interaction)
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
||||||
@@ -255,15 +202,6 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
birthdayDelete(interaction)
|
birthdayDelete(interaction)
|
||||||
break;
|
break;
|
||||||
case 'edit':
|
|
||||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
|
||||||
return await interaction.reply({
|
|
||||||
content: "Unprivileged Access!",
|
|
||||||
flags: MessageFlags.Ephemeral
|
|
||||||
})
|
|
||||||
}
|
|
||||||
birthdayEdit(interaction)
|
|
||||||
break;
|
|
||||||
case 'get':
|
case 'get':
|
||||||
birthdayGet(interaction)
|
birthdayGet(interaction)
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ async function nutsCooldown(interaction) {
|
|||||||
let date = (Date.now() / 1000)
|
let date = (Date.now() / 1000)
|
||||||
if (cooldown.cooldown > date) {
|
if (cooldown.cooldown > date) {
|
||||||
content = `<t:${cooldown.cooldown}:R> kannst du wieder nussen! ;)`
|
content = `<t:${cooldown.cooldown}:R> kannst du wieder nussen! ;)`
|
||||||
thumbnail = 'https://cdn.discordapp.com/attachments/1152723542836772914/1152987472788193361/No-nuts-PhotoRoom.png-PhotoRoom.png'
|
thumbnail = 'https://img.freepik.com/free-vector/no-nut-november-cartoon-illustration-premium-cartoon-vector-icon-illustration-food-object-isolated_138676-6549.jpg'
|
||||||
title = 'To Nut or Not to Nut...'
|
title = 'To Nut or Not to Nut...'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ async function nutsCooldown(interaction) {
|
|||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
async function nutsNut(interaction) {
|
async function nutsNut(interaction, quickMode) {
|
||||||
const db = mClient.db(process.env.M_DB)
|
const db = mClient.db(process.env.M_DB)
|
||||||
const nutsColl = db.collection('items_nuts')
|
const nutsColl = db.collection('items_nuts')
|
||||||
const cdColl = db.collection('items_cooldowns')
|
const cdColl = db.collection('items_cooldowns')
|
||||||
@@ -243,7 +243,7 @@ async function nutsNut(interaction) {
|
|||||||
"normal": 'https://c8.alamy.com/comp/PPPBXK/surprised-pecan-nuts-pile-on-plate-cartoon-PPPBXK.jpg',
|
"normal": 'https://c8.alamy.com/comp/PPPBXK/surprised-pecan-nuts-pile-on-plate-cartoon-PPPBXK.jpg',
|
||||||
"low": 'https://as2.ftcdn.net/v2/jpg/02/24/65/37/1000_F_224653769_ceJk0tq9UT1hSu5FIVUi7BeaN4ucSZGv.jpg',
|
"low": 'https://as2.ftcdn.net/v2/jpg/02/24/65/37/1000_F_224653769_ceJk0tq9UT1hSu5FIVUi7BeaN4ucSZGv.jpg',
|
||||||
"none": 'https://cdn4.vectorstock.com/i/1000x1000/87/08/afraid-pecan-nuts-pile-on-plate-cartoon-vector-22028708.jpg',
|
"none": 'https://cdn4.vectorstock.com/i/1000x1000/87/08/afraid-pecan-nuts-pile-on-plate-cartoon-vector-22028708.jpg',
|
||||||
"onCD": 'https://cdn.discordapp.com/attachments/1152723542836772914/1152987472788193361/No-nuts-PhotoRoom.png-PhotoRoom.png'
|
"onCD": 'https://img.freepik.com/free-vector/no-nut-november-cartoon-illustration-premium-cartoon-vector-icon-illustration-food-object-isolated_138676-6549.jpg'
|
||||||
}
|
}
|
||||||
let image
|
let image
|
||||||
if (!cdData || cdData.cooldown < (Date.now() / 1000)) {
|
if (!cdData || cdData.cooldown < (Date.now() / 1000)) {
|
||||||
@@ -289,17 +289,26 @@ async function nutsNut(interaction) {
|
|||||||
image = images["none"]
|
image = images["none"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (quickMode) {
|
||||||
|
return interaction.editReply({
|
||||||
|
content: `Du hast ${amount} Nüsse bekommen! :chestnut:`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
content = `Du kannst erst <t:${Math.floor(cdData?.cooldown)}:R> wieder nussen :(`
|
content = `Du kannst erst <t:${Math.floor(cdData?.cooldown)}:R> wieder nussen :(`
|
||||||
image = images["onCD"]
|
image = images["onCD"]
|
||||||
await delay(1000)
|
await delay(1000)
|
||||||
embed.setDescription(content)
|
embed.setDescription(content)
|
||||||
embed.setThumbnail(image)
|
embed.setThumbnail(image)
|
||||||
|
embed.setImage(null)
|
||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
})
|
})
|
||||||
@@ -348,7 +357,12 @@ module.exports = {
|
|||||||
.addSubcommand(s =>
|
.addSubcommand(s =>
|
||||||
s
|
s
|
||||||
.setName('nut')
|
.setName('nut')
|
||||||
.setDescription('willst du nuss?')),
|
.setDescription('willst du nuss?'))
|
||||||
|
.addSubcommand(s =>
|
||||||
|
s.setName('quick')
|
||||||
|
.setDescription('A quick nut, mlord?')
|
||||||
|
|
||||||
|
),
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
switch (interaction.options._subcommand) {
|
switch (interaction.options._subcommand) {
|
||||||
case 'give':
|
case 'give':
|
||||||
@@ -372,7 +386,11 @@ module.exports = {
|
|||||||
break;
|
break;
|
||||||
case 'nut':
|
case 'nut':
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
nutsNut(interaction)
|
nutsNut(interaction, false)
|
||||||
|
break;
|
||||||
|
case 'quick':
|
||||||
|
await interaction.deferReply()
|
||||||
|
nutsNut(interaction, true)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ async function quotesRandom(interaction) {
|
|||||||
]).toArray()
|
]).toArray()
|
||||||
}
|
}
|
||||||
const found = rdm[0]
|
const found = rdm[0]
|
||||||
if (!found) { return await interaction.reply({ content: 'Database Empty', flags: MessageFlags.Ephemeral }) }
|
if (!found) { return await interaction.reply({ content: 'No Entry Found.', flags: MessageFlags.Ephemeral }) }
|
||||||
const guild = await interaction.client.guilds.fetch(found.guildID)
|
const guild = await interaction.client.guilds.fetch(found.guildID)
|
||||||
const channel = await guild.channels.fetch(found.channelID)
|
const channel = await guild.channels.fetch(found.channelID)
|
||||||
const message = await channel.messages.fetch(found.messageID)
|
const message = await channel.messages.fetch(found.messageID)
|
||||||
@@ -295,7 +295,7 @@ async function quotesLeaderboard(interaction) {
|
|||||||
|
|
||||||
await delay(5000)
|
await delay(5000)
|
||||||
console.log(fields)
|
console.log(fields)
|
||||||
quotesData.sort((a,b) => {
|
quotesData.sort((a, b) => {
|
||||||
const numA = parseInt(a.name);
|
const numA = parseInt(a.name);
|
||||||
const numB = parseInt(b.name);
|
const numB = parseInt(b.name);
|
||||||
return numA - numB;
|
return numA - numB;
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
const { SlashCommandBuilder } = require("discord.js");
|
||||||
|
|
||||||
|
function askMyBalls() {
|
||||||
|
var answers = [
|
||||||
|
'Absolut, so wie die Authorität unserer Göttin!',
|
||||||
|
'Unterschätze es nicht, genauso wie Roberts sexual frustration',
|
||||||
|
'Ich zedaz so',
|
||||||
|
'Ohne Zweifel',
|
||||||
|
'Definitiv, Alter',
|
||||||
|
'Microsoft Outlook gut',
|
||||||
|
'Das Sternzeichen von Yeesh leuchtet heute stark dafür',
|
||||||
|
'Mit "Support-Desk am Freitagabend" - Wahrscheinlichkeit',
|
||||||
|
'Ist die Nase von Julius wunderschön und lang?',
|
||||||
|
'So wahr wie Laviis Zeichnkünste',
|
||||||
|
'nein...ja... vielleicht?',
|
||||||
|
'Frag mich nachher nochmal',
|
||||||
|
'Die Kalkulationen sind leicht off, ich aber nicht ;)',
|
||||||
|
'Ich sag es dir ein ander Mal',
|
||||||
|
'Ohne schwere Zeiten, würden wir die guten Zeiten nie schätzen',
|
||||||
|
'Genauso schlecht wie eine Ketzerei gegen den Olymp',
|
||||||
|
'Hat der Fuchs uns jemals verraten?...**hust**',
|
||||||
|
'Mein Outlook ist abgeschmiert, mist',
|
||||||
|
'Ich bezweifle es. A propos, zweifel nicht an den Götter und ihren Priester!',
|
||||||
|
'Meine Quellen sagen.... WARNUNG! Artikel 17: Die betroffene Person hat das Recht, von dem Verantwortlichen zu verlangen, dass sie betreffende personenbezogene Daten unverzüglich gelöscht werden, und der Verantwortliche ist verpflichtet, personenbezogene Daten unverzüglich zu löschen, sofern einer der folgenden Gründe zutrifft **ERROR ERROR ERROR**?'
|
||||||
|
]
|
||||||
|
const r = Math.floor(Math.random() * answers.length)
|
||||||
|
|
||||||
|
return answers[r]
|
||||||
|
}
|
||||||
|
|
||||||
|
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
data: new SlashCommandBuilder()
|
||||||
|
.setName('8ball')
|
||||||
|
.setDescription('dont ask me anything')
|
||||||
|
.addSubcommand(s =>
|
||||||
|
s.setName('ask')
|
||||||
|
.setDescription('what do you want to know?')
|
||||||
|
.addStringOption(
|
||||||
|
o => o.setName('question').setDescription('ask away!').setRequired(true))
|
||||||
|
),
|
||||||
|
async execute(interaction) {
|
||||||
|
await interaction.deferReply()
|
||||||
|
await delay(2000)
|
||||||
|
await interaction.editReply(askMyBalls())
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
const { SlashCommandBuilder, EmbedBuilder, AttachmentBuilder } = require("discord.js");
|
||||||
|
|
||||||
|
async function doggoPet(interaction) {
|
||||||
|
|
||||||
|
const responses = [
|
||||||
|
'*loving growl*',
|
||||||
|
'Danke, das habe ich gebraucht.',
|
||||||
|
'Ein bisschen tiefer.',
|
||||||
|
'Ja, genau dort!'
|
||||||
|
]
|
||||||
|
var r = Math.floor(Math.random() * responses.length)
|
||||||
|
|
||||||
|
const filePath = `assets/Command_Doggo/doggo.jpg`;
|
||||||
|
|
||||||
|
const attachment = new AttachmentBuilder(filePath);
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setDescription(responses[r])
|
||||||
|
.setColor(0x51267)
|
||||||
|
.setTimestamp()
|
||||||
|
.setImage(`attachment://doggo.jpg`);
|
||||||
|
|
||||||
|
await interaction.editReply({
|
||||||
|
embeds: [embed],
|
||||||
|
files: [attachment]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
async function doggoFeed(interaction) {
|
||||||
|
await interaction.editReply({
|
||||||
|
content: 'WIP placeholder'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
async function doggoWalk(interaction) {
|
||||||
|
await interaction.editReply({
|
||||||
|
content: 'WIP placeholder'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
async function doggoPlay(interaction) {
|
||||||
|
await interaction.editReply({
|
||||||
|
content: 'WIP placeholder'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
data: new SlashCommandBuilder()
|
||||||
|
.setName('doggo')
|
||||||
|
.setDescription('who is a good boi?')
|
||||||
|
.addSubcommand(s =>
|
||||||
|
s.setName('pet')
|
||||||
|
.setDescription('beeg scratch')
|
||||||
|
)
|
||||||
|
.addSubcommand(s =>
|
||||||
|
s.setName('feed')
|
||||||
|
.setDescription('tastge')
|
||||||
|
)
|
||||||
|
.addSubcommand(s =>
|
||||||
|
s.setName('walk')
|
||||||
|
.setDescription('walkies')
|
||||||
|
)
|
||||||
|
.addSubcommand(s =>
|
||||||
|
s.setName('play')
|
||||||
|
.setDescription('fun time')
|
||||||
|
),
|
||||||
|
async execute(interaction) {
|
||||||
|
await interaction.deferReply()
|
||||||
|
switch (interaction.options._subcommand) {
|
||||||
|
case 'pet':
|
||||||
|
doggoPet(interaction)
|
||||||
|
break;
|
||||||
|
case 'feed':
|
||||||
|
doggoFeed(interaction)
|
||||||
|
break;
|
||||||
|
case 'walk':
|
||||||
|
doggoWalk(interaction)
|
||||||
|
break;
|
||||||
|
case 'play':
|
||||||
|
doggoPlay(interaction)
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
const { SlashCommandBuilder, AttachmentBuilder, EmbedBuilder } = require('discord.js');
|
||||||
|
const fs = require('fs/promises');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
async function makeDay() {
|
||||||
|
const date = new Date();
|
||||||
|
|
||||||
|
const tage = [
|
||||||
|
'sonntag',
|
||||||
|
'montag',
|
||||||
|
'dienstag',
|
||||||
|
'mittwoch',
|
||||||
|
'donnerstag',
|
||||||
|
'freitag',
|
||||||
|
'samstag'
|
||||||
|
];
|
||||||
|
|
||||||
|
const text = {
|
||||||
|
montag: 'Es ist Montag meine Münmler!',
|
||||||
|
mittwoch: 'Es ist Mittwoch meine Kerle!',
|
||||||
|
donnerstag: 'Es ist nicht mehr Mittwoch meine Kerle!',
|
||||||
|
freitag: 'Es ist Freitag meine Kerl*innen!',
|
||||||
|
default: 'Es ist nicht Mittwoch, meine Kerle...'
|
||||||
|
};
|
||||||
|
|
||||||
|
const today = tage[date.getDay()];
|
||||||
|
|
||||||
|
let files;
|
||||||
|
try {
|
||||||
|
files = await fs.readdir('assets/Command_Mittwoch');
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
return { filename: 'nicht_mittwoch', content: text.default };
|
||||||
|
}
|
||||||
|
|
||||||
|
const available = files.map(f => path.parse(f).name);
|
||||||
|
|
||||||
|
if (available.includes(today)) {
|
||||||
|
return {
|
||||||
|
filename: today,
|
||||||
|
content: text[today] || text.default
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
filename: 'nicht_mittwoch',
|
||||||
|
content: text.default
|
||||||
|
};
|
||||||
|
}
|
||||||
|
module.exports = {
|
||||||
|
data: new SlashCommandBuilder()
|
||||||
|
.setName('mittwoch')
|
||||||
|
.setDescription('mittwoch vibes'),
|
||||||
|
|
||||||
|
async execute(interaction) {
|
||||||
|
const { filename, content } = await makeDay();
|
||||||
|
|
||||||
|
const filePath = `assets/Command_Mittwoch/${filename}.jpg`;
|
||||||
|
|
||||||
|
const attachment = new AttachmentBuilder(filePath);
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setTitle(content)
|
||||||
|
.setColor(0x51267)
|
||||||
|
.setTimestamp()
|
||||||
|
.setImage(`attachment://${filename}.jpg`);
|
||||||
|
|
||||||
|
await interaction.reply({
|
||||||
|
embeds: [embed],
|
||||||
|
files: [attachment]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -46,7 +46,7 @@ module.exports = {
|
|||||||
|
|
||||||
// Draw Initial Image
|
// Draw Initial Image
|
||||||
const background = await loadImage(
|
const background = await loadImage(
|
||||||
path.join(__dirname, '../assets/bdbanner.png')
|
path.join(__dirname, '../assets/Event_Birthday/bdbanner.png')
|
||||||
);
|
);
|
||||||
let x = 0;
|
let x = 0;
|
||||||
let y = 0;
|
let y = 0;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ module.exports = {
|
|||||||
|
|
||||||
// Draw Initial Image
|
// Draw Initial Image
|
||||||
const background = await loadImage(
|
const background = await loadImage(
|
||||||
path.join(__dirname, '../assets/background.png')
|
path.join(__dirname, '../assets/Event_MemberJoin/background.png')
|
||||||
);
|
);
|
||||||
let x = 0;
|
let x = 0;
|
||||||
let y = 0;
|
let y = 0;
|
||||||
|
|||||||