놀아보자/파이썬기초

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('자신의 토큰 입력')

'놀아보자 > 파이썬기초' 카테고리의 다른 글

Discord 챗봇 view_2/3  (0) 2022.08.09
Discord 챗봇 view_1/3  (0) 2022.08.09
turtle 실습  (0) 2022.01.08
파일명 변경  (0) 2021.11.23
[PySide6] 콤보박스를 이용한 이미지 불러오기  (0) 2021.11.17