Skip to content

Instantly share code, notes, and snippets.

View Lapis0875's full-sized avatar
👨‍💻
Learning things are fun 😃

Minjun Kim (Lapis0875) Lapis0875

👨‍💻
Learning things are fun 😃
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lapis0875 on github.
  • I am lapis0875 (https://keybase.io/lapis0875) on keybase.
  • I have a public key ASAN_x2AKcxL274D3tGCTsZ-J2KRK4KNL30L1191Lyvbwwo

To claim this, I am signing this object:

@Lapis0875
Lapis0875 / poll_1.md
Created November 30, 2020 16:50
chronous 라이브러리의 이벤트 수신자 구조를 투표받아요!

비동기 이벤트 기반 설계를 만들고있는데 (discord.py의 이벤트 기능만 분리했다고 이해하면 쉽습니다), 이벤트 리스너를 등록하는 부분을 구현하다가 여러분들 의견을 듣고자 여기다 올려봅니다.

1. 이벤트 리스너 구조

1. discord.py의 Context에 영향을 받은 구현 (이벤트와, 이 이벤트가 리스너에 전달할 데이터를 추가로 가지고 있는 객체) :

# listener: coroutinefunction (async def ~)
Structure
---------
(ctx: Context) -> {...}