mcserver-discordbot/bot/extensions/startstop.py

30 lines
645 B
Python
Raw Normal View History

2022-04-02 21:07:11 +02:00
"""
Project is under GNU GENERAL PUBLIC LICENSE 3.0
2022, created by Specoolazius
"""
2022-04-02 21:03:31 +02:00
import discord
from discord.commands import slash_command
from libs import Client
class StartStop(discord.Cog):
"""< discord.Cog >
Extension for starting and stopping the Minecraft server.
"""
def __init__(self, bot: Client):
self.bot = bot
@slash_command(name='start')
async def __execute_start(self, ctx: discord.ApplicationContext) -> None:
2022-04-02 21:31:55 +02:00
returncode = None
2022-04-02 21:41:14 +02:00
@slash_command(name='stop')
async def __execute_stop(self, ctx: discord.ApplicationContext) -> None:
returncode = None
2022-04-02 21:46:26 +02:00
# hi