mirror of
https://github.com/TotalFreedomMC/TotalFreedomBot.git
synced 2024-12-22 15:44:57 +00:00
Update server_commands.py
This commit is contained in:
parent
660c074450
commit
3227452dec
1 changed files with 2 additions and 3 deletions
|
@ -1,12 +1,11 @@
|
||||||
import discord
|
import discord
|
||||||
import requests
|
import requests
|
||||||
import re
|
|
||||||
from checks import *
|
from checks import *
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from functions import *
|
from functions import *
|
||||||
from unicode import *
|
from unicode import *
|
||||||
from telnetlib import Telnet
|
|
||||||
|
|
||||||
class ServerCommands(commands.Cog):
|
class ServerCommands(commands.Cog):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
|
@ -205,7 +204,7 @@ class ServerCommands(commands.Cog):
|
||||||
'Gets the current status of the Server'
|
'Gets the current status of the Server'
|
||||||
em = discord.Embed()
|
em = discord.Embed()
|
||||||
try:
|
try:
|
||||||
json = requests.get("http://play.totalfreedom.me:28966/list?json=true", timeout=5).json()
|
requests.get("http://play.totalfreedom.me:28966/list?json=true", timeout=5).json()
|
||||||
except:
|
except:
|
||||||
em.description = 'Server is offline'
|
em.description = 'Server is offline'
|
||||||
em.colour = 0xFF0000
|
em.colour = 0xFF0000
|
||||||
|
|
Loading…
Reference in a new issue