놀아보자/파이썬기초

Discord 챗봇 동작 테스트

nolja 2022. 8. 9. 20:53
import discord
from discord.ext import commands

intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix=">", intents=intents)

@bot.command()
async def ping(ctx):
    await ctx.send("pong")

@bot.command()    
async def test(ctx):
    await ctx.send("테스트 성공")

   
bot.run('자신의 토큰 입력')