Commit
โข
daa6be8
1
Parent(s):
7e1500a
Update app.py
Browse files
app.py
CHANGED
@@ -38,10 +38,23 @@ class MyClient(discord.Client):
|
|
38 |
self.is_processing = False
|
39 |
self.session = None
|
40 |
|
|
|
|
|
41 |
async def on_ready(self):
|
42 |
logging.info(f'{self.user}๋ก ๋ก๊ทธ์ธ๋์์ต๋๋ค!')
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
self.session = aiohttp.ClientSession()
|
44 |
|
|
|
|
|
|
|
|
|
|
|
45 |
async def on_message(self, message):
|
46 |
if message.author == self.user or not self.is_message_in_specific_channel(message):
|
47 |
return
|
|
|
38 |
self.is_processing = False
|
39 |
self.session = None
|
40 |
|
41 |
+
|
42 |
+
|
43 |
async def on_ready(self):
|
44 |
logging.info(f'{self.user}๋ก ๋ก๊ทธ์ธ๋์์ต๋๋ค!')
|
45 |
+
|
46 |
+
# web.py ํ์ผ ์คํ
|
47 |
+
subprocess.Popen(["python", "web.py"])
|
48 |
+
logging.info("Web.py ์๋ฒ๊ฐ ์์๋์์ต๋๋ค.")
|
49 |
+
|
50 |
+
# aiohttp ํด๋ผ์ด์ธํธ ์ธ์
์์ฑ
|
51 |
self.session = aiohttp.ClientSession()
|
52 |
|
53 |
+
# ๋ด์ด ์์๋ ๋ ์๋ด ๋ฉ์์ง๋ฅผ ์ ์ก
|
54 |
+
channel = self.get_channel(SPECIFIC_CHANNEL_ID)
|
55 |
+
if channel:
|
56 |
+
await channel.send("์ ํ๋ธ ๋น๋์ค URL์ ์
๋ ฅํ๋ฉด, ์๋ง๊ณผ ๋๊ธ์ ๊ธฐ๋ฐ์ผ๋ก ๋ต๊ธ์ ์์ฑํฉ๋๋ค.")
|
57 |
+
|
58 |
async def on_message(self, message):
|
59 |
if message.author == self.user or not self.is_message_in_specific_channel(message):
|
60 |
return
|