Browse Source

チャット正常情報の追加

btc-sounds
みてるぞ 9 months ago
parent
commit
5453ccbdbe
1 changed files with 13 additions and 5 deletions
  1. +13
    -5
      main.py

+ 13
- 5
main.py View File

@@ -25,6 +25,7 @@ class Main:


live_chat = pytchat.create (video_id = YOUTUBE_ID) live_chat = pytchat.create (video_id = YOUTUBE_ID)


system_font = pygame.font.SysFont ('notosanscjkjp', 24)
user_font = pygame.font.SysFont ('notosanscjkjp', 32, user_font = pygame.font.SysFont ('notosanscjkjp', 32,
italic = True) italic = True)
nizika_font = pygame.font.SysFont ('07nikumarufont', 50) nizika_font = pygame.font.SysFont ('07nikumarufont', 50)
@@ -41,11 +42,12 @@ class Main:
answer: str = Talk.main (message) answer: str = Talk.main (message)


screen.blit (balloon, (0, 0)) screen.blit (balloon, (0, 0))
screen.blit (user_font.render ('> ' + message, True,
(0, 0, 0)),
(120, 70))
screen.blit (nizika_font.render (
answer, True, (192, 0, 0)), (100, 150))
screen.blit (
user_font.render ('> ' + message, True, (0, 0, 0)),
(120, 70))
screen.blit (
nizika_font.render (answer, True, (192, 0, 0)),
(100, 150))


pygame.display.update () pygame.display.update ()


@@ -62,6 +64,12 @@ class Main:


time.sleep (10) time.sleep (10)


screen.bilt (
system_font.render (
f'live_chat.is_alive () == {live_chat.is_alive ()}',
True, (0, 0, 0)),
(0, 0))

pygame.display.update () pygame.display.update ()


for event in pygame.event.get (): for event in pygame.event.get ():


Loading…
Cancel
Save