Clean up formatting

This commit is contained in:
Joscha 2020-01-27 07:30:42 +00:00
parent a9b6279be9
commit 77bf12f251

View file

@ -1,17 +1,14 @@
#!/usr/bin/env python3
import asyncio
import configparser
import datetime
import isodate
import logging
import random
import re
import time
from apiclient.discovery import build
import isodate
import yaboli
from yaboli.util import *
from apiclient.discovery import build
from yaboli.util import asyncify, mention
class Video:
@ -25,6 +22,7 @@ class Video:
self.blocked = list(sorted(blocked)) if blocked is not None else None
self.allowed = list(sorted(allowed)) if allowed is not None else None
class YouTube:
def __init__(self, api_key):
self.service = build("youtube", "v3", developerKey=api_key)
@ -47,6 +45,7 @@ class YouTube:
return videos
class Playlist:
COUNTRIES = { # according to en.wikipedia.org/wiki/ISO_3166-1_alpha-2, 2018-08-17 18:12:15 UTC
"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU",
@ -273,6 +272,7 @@ class Playlist:
video_sum = sum((video.duration for video, _ in videos), datetime.timedelta())
return self.playtime_left() + video_sum
class ArgonDJBot(yaboli.Bot):
HELP_GENERAL = ["Keeps track of the video queue. !q <link> to queue a new video."]
HELP_SPECIFIC = [
@ -354,8 +354,8 @@ class ArgonDJBot(yaboli.Bot):
"LlFmBB8wzg0", # It's soup
"ne-gcy--MeY", # Crow on webcam
"1s04tEDJVjY", # Smooth criminal cat
"P4JDgK6ib6Q", # Pigeon in river
"vJqiq0Feqng", # Charles Cornell quack
"P4JDgK6ib6Q", # Pigeon in river
"vJqiq0Feqng", # Charles Cornell quack
]
DRAMATICSKIP_VIDEOS = [
"VHkP88fx164", # animated video
@ -626,4 +626,3 @@ def main():
if __name__ == "__main__":
main()