added minecraft server status command
This commit is contained in:
1 parent
94bf054772
commit
3858a7e265
3 files changed
+4667
-4548
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"autoroles": {
|
"autoroles": {
|
||||||
"1133441692196950101": "1192595134026616894"
|
"1133441692196950101": "1192595134026616894",
|
||||||
|
"1487585267777933455": "1487585267777933459"
|
||||||
},
|
},
|
||||||
"autobans": {
|
"autobans": {
|
||||||
"1133441692196950101": "1264634623950848158"
|
"1133441692196950101": "1264634623950848158"
|
||||||
|
|||||||
+4599
-4547
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,66 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const { time } = require("discord.js");
|
||||||
|
const { exec } = require('child_process');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'mcserver',
|
||||||
|
description: `shhhhh`,
|
||||||
|
aliases: [''],
|
||||||
|
usage: 'mcserver',
|
||||||
|
|
||||||
|
async execute(client, message) {
|
||||||
|
const sent = await message.reply({
|
||||||
|
content: null, embeds: [{
|
||||||
|
color: 0x8aa2b3,
|
||||||
|
title: '',
|
||||||
|
author: {
|
||||||
|
name: message.author.username,
|
||||||
|
icon_url: message.author.displayAvatarURL(),
|
||||||
|
},
|
||||||
|
description: '<a:loading_icon:1366587619890302998> pinging...',
|
||||||
|
footer: {
|
||||||
|
text: `twitter @ ${message.guild.name}`,
|
||||||
|
icon_url: client.user.displayAvatarURL(),
|
||||||
|
},
|
||||||
|
timestamp: new Date(),
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
|
const online = await new Promise((resolve) => {
|
||||||
|
exec(`ping -n 1 mc.radium.wtf`, (error) => {
|
||||||
|
resolve(!error);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
let embed;
|
||||||
|
|
||||||
|
if (online) {
|
||||||
|
embed = {
|
||||||
|
color: 0x8aa2b3,
|
||||||
|
title: '',
|
||||||
|
author: {
|
||||||
|
name: message.author.username,
|
||||||
|
icon_url: message.author.displayAvatarURL(),
|
||||||
|
},
|
||||||
|
description: 'server is online!',
|
||||||
|
fields: [
|
||||||
|
{ name: 'ip', value: `mc.radium.wtf`, inline: true },
|
||||||
|
{ name: 'version', value: `26.1.2 (latest)`, inline: true },
|
||||||
|
],
|
||||||
|
footer: {
|
||||||
|
text: `twitter @ ${message.guild.name}`,
|
||||||
|
icon_url: client.user.displayAvatarURL(),
|
||||||
|
},
|
||||||
|
timestamp: new Date(),
|
||||||
|
thumbnail: {
|
||||||
|
url: "https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fcdn.freebiesupply.com%2Flogos%2Flarge%2F2x%2Fminecraft-1-logo-png-transparent.png&f=1&nofb=1&ipt=9aebb419eba433a6b68129b3cb0aeebee3d1f40d3c7ea181b1da41fead97acdd",
|
||||||
|
height: 2637,
|
||||||
|
width: 2400,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
await sent.edit({ content: null, embeds: [embed] });
|
||||||
|
},
|
||||||
|
};
|
||||||
Reference in new issue
Block a user