style: 🚨 Fix linter problem
All checks were successful
Publish staging Docker image / Push Docker image to Gitea Container Registry (push) Successful in 2m16s

This commit is contained in:
2024-03-03 21:04:26 +01:00
parent 437b6431d0
commit 1bfc619cc6
4 changed files with 88 additions and 83 deletions

View File

@ -1,17 +1,17 @@
const { SlashCommandBuilder } = require('discord.js')
const config = require('../../config.json')
const { SlashCommandBuilder } = require('discord.js');
const config = require('../../config.json');
module.exports = {
data: new SlashCommandBuilder()
.setName('check-perms')
.setDescription('Check if the user has the correct permissions to start the Minecraft server.'),
async execute(interaction) {
for (const role of config.allowedRoles) {
if (interaction.member.roles.cache.has(role)) {
await interaction.reply({ content: 'You have the correct permissions to start the Minecraft server.', ephemeral: true });
return;
}
}
await interaction.reply({ content: 'You have the correct permissions to start the Minecraft server.', ephemeral: true });
},
}
data: new SlashCommandBuilder()
.setName('check-perms')
.setDescription('Check if the user has the correct permissions to start the Minecraft server.'),
async execute(interaction) {
for (const role of config.allowedRoles) {
if (interaction.member.roles.cache.has(role)) {
await interaction.reply({ content: 'You have the correct permissions to start the Minecraft server.', ephemeral: true });
return;
}
}
await interaction.reply({ content: 'You have the correct permissions to start the Minecraft server.', ephemeral: true });
},
};

View File

@ -1,13 +1,13 @@
const { SlashCommandBuilder } = require('discord.js')
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('test-time')
.setDescription('Test the time between now and 4am in discord timestamp'),
async execute(interaction) {
const date = new Date(new Date().setDate(new Date().getDate() + 1))
date.setUTCHours(3, 0, 0, 0)
const test = Math.round(date.getTime() / 1000);
await interaction.reply({ content: `Time between now and 4am: <t:${test}:R>`}, {ephemeral: true});
},
}
data: new SlashCommandBuilder()
.setName('test-time')
.setDescription('Test the time between now and 4am in discord timestamp'),
async execute(interaction) {
const date = new Date(new Date().setDate(new Date().getDate() + 1));
date.setUTCHours(3, 0, 0, 0);
const test = Math.round(date.getTime() / 1000);
await interaction.reply({ content: `Time between now and 4am: <t:${test}:R>` }, { ephemeral: true });
},
};