kai-image-xl / app.py
seawolf2357's picture
Update app.py
08baccf verified
raw
history blame
No virus
632 Bytes
import discord
intents = discord.Intents.default() # ๊ธฐ๋ณธ intents ํ™œ์„ฑํ™”
intents.messages = True # ๋ฉ”์‹œ์ง€ ์ฝ๊ธฐ์— ๋Œ€ํ•œ intents ํ™œ์„ฑํ™”
class MyClient(discord.Client):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
async def on_ready(self):
print(f'Logged on as {self.user}!')
async def on_message(self, message):
if message.author == self.user:
return
response = message.content + " hello"
await message.channel.send(response)
# ๋ด‡ ๊ฐ์ฒด ์ƒ์„ฑ ๋ฐ ์‹คํ–‰
client = MyClient(intents=intents)
client.run('your_token_here')