File size: 681 Bytes
4a77f8a
 
 
 
534c638
4a77f8a
 
534c638
4a77f8a
 
1269210
4a77f8a
 
 
 
 
1269210
4a77f8a
 
534c638
4a77f8a
 
 
 
534c638
4a77f8a
 
 
a4e32e3
4a77f8a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import discord
from discord.ext import commands
from discord.ext.commands import Bot
import os

# ๋””์Šค์ฝ”๋“œ ๋ด‡ ํ† ํฐ
ISC = "YISC"

# ๋””์Šค์ฝ”๋“œ ๋ด‡ ํด๋ผ์ด์–ธํŠธ ์ƒ์„ฑ
client = Bot(commandprefix='!')

# ๋ฉ”์‹œ์ง€ ์ฒ˜๋ฆฌ ํ•จ์ˆ˜
async def processmessage(message):
    # ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์•„ ์ฒ˜๋ฆฌ
    if message.author == client.user:
        return

    # ๋ฉ”์‹œ์ง€ ์ฒ˜๋ฆฌ ๋กœ์ง ์ถ”๊ฐ€
    await message.channel.send(f"AI: {message.content}")

# ์ด๋ฒคํŠธ ํ•ธ๋“ค ๋“ฑ๋ก
@client.event
async def onready():
    print(f'{client.user} ๋ด‡์ด ์ค€๋น„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.')

@client.event
async def onmessage(message):
    await processmessage(message)

# ๋ด‡ ์‹คํ–‰
client.run(ISC)