Browse Source

пока чесал жопу еще кое что придумал

huy
gsd 2 years ago
parent
commit
e0534267af
  1. 5
      other_ext/register.py
  2. 3
      other_ext/url_checker.py
  3. 2
      other_ext/webhook_helper.py

5
other_ext/register.py

@ -2,12 +2,13 @@ import discord
from ..exceptions import *
from ..bot import DiscordClient
from ..player import Player
import os
class Extension:
auth_channel = 960796520247091201
default_role = 684828780040421388
def __init__(self, core: DiscordClient, enabled = True):
if not enabled: return None
def __init__(self, core: DiscordClient):
if not os.getenv("REGISTER_ENABLED", None): return None
@core.tree.command(name = "register", description = "Привязать дискорд к стиму")
@discord.app_commands.describe(profile=core.ANY_INPUT)
async def register(

3
other_ext/url_checker.py

@ -1,7 +1,7 @@
from discord.ext import tasks
import discord
from ..bot import DiscordClient
import re
import re, os
class Extension:
allow_domains = ["steamcommunity.com","s.team","tenor.com","tf2.pblr-nyk.pro", "pblr-nyk.pro", "youtu.be", "youtube.com"]
@ -9,6 +9,7 @@ class Extension:
allow_roles = [744928190895489074, 976924951447736453]
core = None
def __init__(self, core: DiscordClient):
if not os.getenv("URLCHECKER_ENABLED", None): return None
self.core = core
@core.event
async def on_message(message: discord.Message):

2
other_ext/webhook_helper.py

@ -3,6 +3,7 @@ import discord
from ..bot import DiscordClient
import asyncio
import traceback
import os
class Extension:
core = None
@ -14,6 +15,7 @@ class Extension:
no_reason = {}
def __init__(self, core: DiscordClient):
if not os.getenv("WEBHOOK_HELPER_ENABLED", None): return None
self.core = core
self.track_guild_id = core.main_server_id

Loading…
Cancel
Save