diff --git a/bot/assets/clock.png b/bot/assets/clock.png new file mode 100644 index 0000000..3941d5d Binary files /dev/null and b/bot/assets/clock.png differ diff --git a/bot/assets/cloud.png b/bot/assets/cloud.png new file mode 100644 index 0000000..d915345 Binary files /dev/null and b/bot/assets/cloud.png differ diff --git a/bot/assets/docker.png b/bot/assets/docker.png new file mode 100644 index 0000000..927ed25 Binary files /dev/null and b/bot/assets/docker.png differ diff --git a/bot/assets/rip.png b/bot/assets/rip.png new file mode 100644 index 0000000..7c25756 Binary files /dev/null and b/bot/assets/rip.png differ diff --git a/bot/cogs/spawner.py b/bot/cogs/spawner.py index 603fe56..c779b33 100644 --- a/bot/cogs/spawner.py +++ b/bot/cogs/spawner.py @@ -24,6 +24,8 @@ class Server: # Global List of all running Containers containers = list() +color = discord.Color.from_rgb(13, 183, 237) + def seed_generator(): seed = random.randrange(1_000_000_000, 100_000_000_000_000) if random.randrange(0,2) == 0: @@ -80,11 +82,12 @@ class Spawner(commands.Cog): This could take up to **5 minutes** ''', - color=discord.Color.random(), + color=color, timestamp=datetime.now(pytz.timezone('Europe/Berlin')) ) - - start = await ctx.send(embed=embed) + file = discord.File("../assets/clock.png", filename="clock.png") + embed.set_thumbnail(url="attachment://clock.png") + start = await ctx.send(file=file, embed=embed) port = find_free_port() server_name = server_name.title() @@ -170,11 +173,13 @@ class Spawner(commands.Cog): **Connection URL**: garde-studios.de:{port} ''', - color=discord.Color.random(), + color=color, timestamp=datetime.now(pytz.timezone('Europe/Berlin')) ) + file = discord.File("../assets/docker.png", filename="docker.png") + embed.set_thumbnail(url="attachment://docker.png") await start.delete() - await ctx.send(embed=embed) + await ctx.send(file=file, embed=embed) @commands.hybrid_command(name='servers') async def servers(self, ctx: commands.Context): @@ -190,7 +195,7 @@ class Spawner(commands.Cog): embed = discord.Embed( title="Currently Running Servers", description="List of all currently running Minecraft Servers", - color=discord.Color.random(), + color=color, timestamp=datetime.now(pytz.timezone('Europe/Berlin')) ) @@ -200,7 +205,11 @@ class Spawner(commands.Cog): *URL*: garde-studios.de:{container.port} ''' embed.add_field(name=f'{container.name} 0/{container.players}', value=desc) - await ctx.send(embed=embed) + + file = discord.File("../assets/cloud.png", filename="cloud.png") + embed.set_thumbnail(url="attachment://cloud.png") + + await ctx.send(file=file, embed=embed) @commands.hybrid_command(name='kill') async def kill(self, ctx: commands.Context, server_name: str): @@ -234,7 +243,17 @@ class Spawner(commands.Cog): #self.client.volumes.get(server_name).remove() containers.remove(conn) - await ctx.send(f"Server {server_name} killed successfully") + embed = discord.Embed( + title="Killed", + description=f"{server_name} killed!", + color=color, + timestamp=datetime.now(pytz.timezone('Europe/Berlin')) + ) + + file = discord.File("../assets/rip.png", filename="rip.png") + embed.set_thumbnail(url="attachment://rip.png") + + await ctx.send(file=file, embed=embed) if __name__ == '__main__': for _ in range(10):