standarovskid commited on
Commit
5020be5
·
verified ·
1 Parent(s): d069bca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -23,15 +23,16 @@ DISCORD_TOKEN = os.getenv("DISCORD_TOKEN")
23
  HF_TOKEN=os.getenv("HF_TOKEN")
24
 
25
  def get_client(session: Optional[str] = None) -> Client:
26
- # Setup DNS resolver to avoid potential issues
27
- resolver = AsyncResolver(nameservers=["1.1.1.1", "8.8.8.8"])
28
- connector = aiohttp.TCPConnector(resolver=resolver)
29
- client = Client("https://standarovskid-bot.hf.space/", token=HF_TOKEN)
30
  if session:
31
  client.session_hash = session
32
  return client
33
 
34
  # Setup Discord bot
 
 
 
 
35
  intents = discord.Intents.default()
36
  intents.message_content = True
37
  intents.members = True
 
23
  HF_TOKEN=os.getenv("HF_TOKEN")
24
 
25
  def get_client(session: Optional[str] = None) -> Client:
26
+ client = Client("https://standarovskid-bot.hf.space/", token=HF_TOKEN)
 
 
 
27
  if session:
28
  client.session_hash = session
29
  return client
30
 
31
  # Setup Discord bot
32
+ # Setup DNS resolver to avoid potential issues
33
+ resolver = AsyncResolver(nameservers=["1.1.1.1", "8.8.8.8"])
34
+ connector = aiohttp.TCPConnector(resolver=resolver)
35
+
36
  intents = discord.Intents.default()
37
  intents.message_content = True
38
  intents.members = True