Skip to content

Commit

Permalink
Merge pull request #2 from vb2007/dev
Browse files Browse the repository at this point in the history
improved /server
  • Loading branch information
vb2007 authored May 5, 2024
2 parents 1a1680a + b954e9e commit 71fa517
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions commands/utility/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ module.exports = {
.setDescription("Provides information about the current server."),
async execute(interaction) {
if(!interaction.inGuild()) {
var authorField = { name: "" }
var embedFields = [
{ name: "Invalid command useage", value: "This function is only avalible on servers." }
];
var authorField = {};
var embedFields = [];
var embedDescription = "This function is only avalible on servers.";
}
else {
const { guild } = interaction;
Expand All @@ -36,6 +35,8 @@ module.exports = {

const embedReply = new EmbedBuilder({
color: 0x5F0FD6,
title: "Server information.",
description: embedDescription,
author: authorField,
fields: embedFields,
timestamp: new Date().toISOString(),
Expand Down

0 comments on commit 71fa517

Please sign in to comment.