diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3b11d79..b4c416b 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 6cee963..1c5141a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,7 +1,7 @@
-
+
@@ -11,23 +11,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -35,16 +23,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
@@ -70,7 +84,7 @@
-
+
@@ -78,9 +92,6 @@
-
-
-
@@ -102,11 +113,11 @@
-
+
-
+
@@ -123,33 +134,33 @@
-
- 1523209486242
+
+ 1523216716960
- 1523209486242
+ 1523216716960
-
+
-
+
-
+
+
+
-
-
@@ -157,20 +168,24 @@
-
-
-
-
-
-
-
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
diff --git a/bin/bot.py b/bin/bot.py
index 3c71634..6506f58 100644
--- a/bin/bot.py
+++ b/bin/bot.py
@@ -1,8 +1,10 @@
import discord
import asyncio
+
client = discord.Client()
-ownerid = "155076323612688384"
+ownerid = ("155076323612688384")
+
##Uptime Variablen##
minutes = 0
@@ -103,14 +105,33 @@ async def on_message(message):
## Player ##
if message.content.lower().startswith("?play"):
- link = message.content[6:]
try:
- channel = message.author.voice.voice_channel
- voice = await client.join_voice_channel(channel)
- player = await voice.create_ytdl_player(link)
- players[message.server.id] = player
- await client.send_message(message.channel, "__Wird jetzt ausgeführt__\n\n :arrow_forward: {0}".format(link))
- player.start()
+ link = message.content[6:]
+ if not client.is_voice_connected(message.server):
+ try:
+ channel = message.author.voice.voice_channel
+ voice = await client.join_voice_channel(channel)
+ player = await voice.create_ytdl_player(link, before_options=" -reconnect 1 -reconnect_streamed 1"
+ " -reconnect_delay_max 5")
+ players[message.server.id] = player
+ await client.send_message(message.channel, "__Wird jetzt ausgeführt__\n\n :arrow_forward: {0}".format(link))
+ player.start()
+ except Exception as error2:
+ await client.send_message(message.channel, "Error \n\n ```{erro}```".format(erro=error2))
+ finally:
+ pass
+ if client.is_voice_connected(message.server):
+ try:
+ voice = client.voice_client_in(message.server)
+ players[message.server.id].stop()
+ player = await voice.create_ytdl_player(link, before_options=" -reconnect 1 -reconnect_streamed 1"
+ " -reconnect_delay_max 5")
+ players[message.server.id] = player
+ player.start()
+ except Exception as error2:
+ await client.send_message(message.channel, "Error \n\n ```{erro}```".format(erro=error2))
+ finally:
+ pass
except Exception as error2:
await client.send_message(message.channel, "Error \n\n ```{erro}```".format(erro=error2))
finally:
@@ -168,4 +189,4 @@ async def uptime():
client.loop.create_task(uptime())
-client.run('-><-')
\ No newline at end of file
+client.run("-><-")
\ No newline at end of file
diff --git a/bin/config.ini b/bin/config.ini
new file mode 100644
index 0000000..62b25e5
--- /dev/null
+++ b/bin/config.ini
@@ -0,0 +1 @@
+Discord-Key = Its not Working
\ No newline at end of file
diff --git a/run.py b/run.py
new file mode 100644
index 0000000..eb6bb1d
--- /dev/null
+++ b/run.py
@@ -0,0 +1 @@
+import logging
\ No newline at end of file