mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Radio restart serverside
This commit is contained in:
@@ -19,6 +19,7 @@ import shutil
|
||||
import sys
|
||||
import threading
|
||||
import uuid
|
||||
import subprocessS
|
||||
from datetime import datetime
|
||||
from logging import handlers
|
||||
from pathlib import Path, PurePath
|
||||
@@ -1345,6 +1346,37 @@ async def max_weight(lista):
|
||||
|
||||
# *=========================================== Define Commands
|
||||
|
||||
@client.hybrid_command(
|
||||
name="skip_track",
|
||||
description="Przeskocz kawałek w radiu",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
async def skip_track(ctx):
|
||||
with ctx.typing():
|
||||
allowed = False
|
||||
for role in ctx.author.roles:
|
||||
if role.name == "Thane":
|
||||
allowed = True
|
||||
if not allowed:
|
||||
await ctx.send("Łapy precz od radia")
|
||||
|
||||
|
||||
@client.hybrid_command(
|
||||
name="zrestartuj_radio",
|
||||
description="Komenda ktora uruchamia radio ponownie jakby się zawiesiło",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
async def zrestartuj_radio(ctx):
|
||||
with ctx.typing():
|
||||
allowed = False
|
||||
for role in ctx.author.roles:
|
||||
if role.name == "Thane":
|
||||
allowed = True
|
||||
if not allowed:
|
||||
await ctx.send("Łapy precz od radia")
|
||||
else:
|
||||
subprocess.call(['sh', './restart_radio.sh'])
|
||||
|
||||
|
||||
@client.hybrid_command(
|
||||
name="dej_co_ze_spotifaja",
|
||||
|
||||
Reference in New Issue
Block a user