일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- Google Excel
- django
- matplotlib
- Java
- numpy
- gas
- Excel
- Kotlin
- string
- SQL
- c#
- google apps script
- array
- hive
- list
- Github
- math
- PANDAS
- Redshift
- Python
- Google Spreadsheet
- 파이썬
- PostgreSQL
- Apache
- Tkinter
- dataframe
- Mac
- GIT
- PySpark
- Today
- Total
목록discord api (2)
달나라 노트
Python discord API를 사용할 때 어떤 메세지의 작성자를 불러오는 방법이 있습니다. 먼저 discord.ext.commands를 사용하는 경우입니다. from discord.ext import commands discord_token = 'token_string' client = commands.Bot(command_prefix='/') @client.event async def on_ready(): print('{} logged in.'.format(client)) print('Bot: {}'.format(client.user)) print('Bot name: {}'.format(client.user.name)) print('Bot ID: {}'.format(client.user.id)) ..

이번에는 Python으로 주사위를 굴려서 랜덤한 숫자를 return해주는 bot을 만들어봅시다. 이 글을 읽기 전에 discord bot에 관한 배경 지식이 없거나 기초적인 셋팅을 하지 않은 상태라면 아래 링크를 먼저 참고하면 좋습니다. https://cosmosproject.tistory.com/384 from discord.ext import commands discord_token = 'discord_token_string' client = commands.Bot(command_prefix='/') @client.event async def on_ready(): print('{} logged in.'.format(client)) print('Bot: {}'.format(client.user)) pr..