Spaces:
Runtime error
Runtime error
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') | |