-
Notifications
You must be signed in to change notification settings - Fork 91
/
embeds.py
39 lines (35 loc) · 1.33 KB
/
embeds.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from discord import Embed
from connect_and_launch import get_server_info
def server_info_embed():
""" Generates embed object for server info"""
ip, status, players, software, version, tps = get_server_info()
text = f"**IP:** {ip} \n" \
f"**Status:** {status} \n" \
f"**Players:** {players} \n" \
f"**TPS:** {tps} \n" \
f"**Version:** {software} {version}"
embed = Embed()
embed.add_field(name="Server Info", value=text, inline=False)
return embed
def help_embed():
""" Generates embed object for help command"""
embed = Embed(title="Help")
embed.add_field(name="--launch",
value="Launches the server",
inline=False)
embed.add_field(name="--status",
value="Gets the server status",
inline=False)
embed.add_field(name="--info",
value="Gets the server info",
inline=False)
embed.add_field(name="--players",
value="Gets the number of players",
inline=False)
embed.add_field(name="--stop",
value="Stops the server",
inline=False)
embed.add_field(name="--help",
value="Displays this message",
inline=False)
return embed