kai-flx / app.py
seawolf2357's picture
Update app.py
08baccf verified
raw
history blame
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')