mirror of
https://github.com/kaaninchen/Gleiswechsel.git
synced 2026-07-21 19:52:47 +00:00
config.py in src verschoben
This commit is contained in:
@@ -2,7 +2,7 @@ import discord
|
|||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
from discord.ext import tasks, commands
|
from discord.ext import tasks, commands
|
||||||
from config import config
|
from src.config import config
|
||||||
from src.handlers import rename_vc
|
from src.handlers import rename_vc
|
||||||
from src.commands import setup_commands
|
from src.commands import setup_commands
|
||||||
from src.embeds import build_error_embed
|
from src.embeds import build_error_embed
|
||||||
|
|||||||
+3
-4
@@ -1,6 +1,6 @@
|
|||||||
import discord
|
import discord
|
||||||
import time
|
import time
|
||||||
from config import config
|
from src.config import config
|
||||||
from src.utils import random_connection
|
from src.utils import random_connection
|
||||||
|
|
||||||
current = None
|
current = None
|
||||||
@@ -10,12 +10,12 @@ async def rename_vc(bot: discord.Bot) -> bool:
|
|||||||
|
|
||||||
guild = bot.get_guild(int(config["server"]))
|
guild = bot.get_guild(int(config["server"]))
|
||||||
if guild is None:
|
if guild is None:
|
||||||
print(f"Guild {config['server']} not found! Is the bot a member?")
|
print(f"Es konnte kein Server mit der ID {config['server']} gefunden werden! Ist der Bot ein Member?")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
channel = guild.get_channel(int(config["vc"]))
|
channel = guild.get_channel(int(config["vc"]))
|
||||||
if not isinstance(channel, discord.VoiceChannel):
|
if not isinstance(channel, discord.VoiceChannel):
|
||||||
print(f"Unable to find voice-Channel {config['vc']} on the server")
|
print(f"Es konnte kein VC mit der ID {config['vc']} auf dem Server gefunden werden")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
current = random_connection()
|
current = random_connection()
|
||||||
@@ -32,5 +32,4 @@ async def rename_vc(bot: discord.Bot) -> bool:
|
|||||||
print(f"{current_time}: Wenn hier keine Nachricht mehr kommt bin ich im Cooldown")
|
print(f"{current_time}: Wenn hier keine Nachricht mehr kommt bin ich im Cooldown")
|
||||||
await channel.edit(name=f"{config['formatting']}{train_name}",)
|
await channel.edit(name=f"{config['formatting']}{train_name}",)
|
||||||
print(f"{current_time}: Name geändert!")
|
print(f"{current_time}: Name geändert!")
|
||||||
print("-----------------------------------------")
|
|
||||||
return True
|
return True
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import requests
|
import requests
|
||||||
import random
|
import random
|
||||||
from config import config
|
from src.config import config
|
||||||
from src.data.operators import OPERATORS
|
from src.data.operators import OPERATORS
|
||||||
|
|
||||||
def random_connection():
|
def random_connection():
|
||||||
|
|||||||
Reference in New Issue
Block a user