From fd7c4d44f5911a10df4c667a22cf95816c91077b Mon Sep 17 00:00:00 2001 From: Dylan Dizon Date: Sat, 3 Nov 2018 20:04:39 -0400 Subject: [PATCH 1/2] Prune incomplete, vestigial, and irrelevant code - Completely removed music cog for now - Halted Google Play Music integration - Removed "periodic_gpm" items from tasks file --- src/cogs/music.py | 57 -------------------------------------------- src/cogs/periodic.py | 8 ------- src/cogs/tools.py | 48 +------------------------------------ src/utils/utils.py | 3 +-- 4 files changed, 2 insertions(+), 114 deletions(-) delete mode 100644 src/cogs/music.py diff --git a/src/cogs/music.py b/src/cogs/music.py deleted file mode 100644 index b60d0f6..0000000 --- a/src/cogs/music.py +++ /dev/null @@ -1,57 +0,0 @@ -import asyncio -import json -from datetime import datetime as dt -from urllib import parse -import re -from pprint import pprint - -import discord as d -from discord import errors as err -from discord.ext import commands as cmds -from discord.ext.commands import errors as errext -# import gmusicapi as gpm -# import googleapiclient as gapic -# import apiclient as apic - -from misc import exceptions as exc -from misc import checks -from utils import utils as u - - -class Music: - - # def __init__(self, bot): - # self.bot = bot - # - # self.yt_service = apic.discovery.build('youtube', 'v3', developerKey=u.secrets['client_secrets']['client_secret']) - # - @cmds.group(aliases=['pl'], brief='(G) Play music', description='Play music from YouTube, Soundcloud, or Google Play Music') - async def play(self, ctx): - print(ctx.invoked_subcommand) - # - # @play.command(name='youtube', aliases=['you', 'tube', 'yt', 'y']) - # async def _play_youtube(self, ctx, *videos): - # try: - # if not videos: - # raise exc.MissingArgument - # - # vids = [] - # - # for video in videos: - # if 'http' in video and 'youtube' in video: - # vids.append(parse.parse_qs(parse.urlparse(video).query)['v'][0]) - # else: - # vids.append(video) - # - # print(vids) - # - # response = self.yt_service.videos().list(part='snippet', id=','.join(vids)).execute() - # pprint(response) - # - # except exc.MissingArgument: - # await ctx.send('**Invalid youtube url or ID**', delete_after=7) - # await ctx.message.add_reaction('\N{CROSS MARK}') - - @play.command(name='googleplaymusic', aliases=['googleplay', 'googlemusic', 'playmusic', 'play', 'gpm']) - async def _play_googleplaymusic(self, ctx, query): - pass diff --git a/src/cogs/periodic.py b/src/cogs/periodic.py index 1f36b88..40b328f 100644 --- a/src/cogs/periodic.py +++ b/src/cogs/periodic.py @@ -6,7 +6,6 @@ import discord as d from discord import errors as err from discord.ext import commands as cmds from discord.ext.commands import errors as errext -import gmusicapi as gpm from misc import exceptions as exc from misc import checks @@ -18,16 +17,9 @@ class Post: def __init__(self, bot): self.bot = bot - for task in u.tasks['periodic_gpm']: - self.bot.loop.create_task() - async def _check_posts(self, user, channel): pass @cmds.group(aliases=['update', 'up', 'u']) async def updates(self, ctx): pass - - @updates.command(name='googleplaymusic', aliases=['googlemusic', 'playmusic', 'music', 'gpm']) - async def _updates_googleplaymusic(self, ctx): - pass diff --git a/src/cogs/tools.py b/src/cogs/tools.py index 81704c5..2aedbe1 100644 --- a/src/cogs/tools.py +++ b/src/cogs/tools.py @@ -7,12 +7,7 @@ import traceback as tb import webbrowser import discord as d -import httplib2 -import requests_oauthlib as ro -from apiclient import http -from apiclient.discovery import build from discord.ext import commands as cmds -from oauth2client.client import flow_from_clientsecrets #from run import config from cogs import booru @@ -51,7 +46,7 @@ class Utils: await ctx.message.add_reaction('\N{TABLE TENNIS PADDLE AND BALL}') await ctx.send(ctx.author.mention + ' \N{TABLE TENNIS PADDLE AND BALL} `' + str(round(self.bot.latency * 1000)) + 'ms`', delete_after=5) - @cmds.command(aliases=['pre'], brief='List bot prefixes', description='Shows all used prefixes') + @cmds.command(aliases=['pre', 'prefixes'], brief='List bot prefixes', description='Shows all used prefixes') async def prefix(self, ctx): await ctx.send('**Prefix:** `{}`'.format('` or `'.join(u.settings['prefixes'][ctx.guild.id] if ctx.guild.id in u.settings['prefixes'] else u.config['prefix']))) @@ -80,44 +75,3 @@ class Utils: @send.command(name='user', aliases=['u', 'member', 'm']) async def send_user(self, ctx, user, *, message): await d.utils.get(self.bot.get_all_members(), id=int(user)).send(message) - - @cmds.command(aliases=['authenticateupload', 'authupload', 'authup', 'auth'], hidden=True) - async def authenticate_upload(self, ctx): - global youtube - flow = flow_from_clientsecrets('client_secrets.json', scope='https://www.googleapis.com/auth/youtube.upload', - login_hint='botmyned@gmail.com', redirect_uri='urn:ietf:wg:oauth:2.0:oob') - flow.params['access_type'] = 'offline' - webbrowser.open_new_tab(flow.step1_get_authorize_url()) - credentials = flow.step2_exchange(input('Authorization code: ')) - youtube = build('youtube', 'v3', http=credentials.authorize(http.build_http())) - print('Service built.') - - @cmds.command(aliases=['up', 'u', 'vid', 'v'], hidden=True) - @cmds.has_permissions(administrator=True) - async def upload(self, ctx): - global youtube - attachments = ctx.message.attachments - try: - if not attachments: - raise exc.MissingAttachment - if len(attachments) > 1: - raise exc.TooManyAttachments(len(attachments)) - mime = mimetypes.guess_type(attachments[0].filename)[0] - if 'video/' in mime: - with tempfile.NamedTemporaryFile() as temp: - await attachments[0].save(temp) - else: - raise exc.InvalidVideoFile(mime) - print('https://www.youtube.com/watch?v=' + youtube.videos().insert(part='snippet', - body={'categoryId': '24', 'title': 'Test'}, media_body=http.MediaFileUpload(temp.name, chunksize=-1))) - except exc.InvalidVideoFile as e: - await ctx.send('`' + str(e) + '` **invalid video type**', delete_after=7) - except exc.TooManyAttachments as e: - await ctx.send('`' + str(e) + '` **too many attachments.** Only one attachment is permitted to upload.', delete_after=7) - except exc.MissingAttachment: - await ctx.send('**Missing attachment**', delete_after=7) - - @upload.error - async def upload_error(self, ctx, error): - pass -# http. diff --git a/src/utils/utils.py b/src/utils/utils.py index 64bc89d..73bb1ee 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -6,7 +6,6 @@ import subprocess from contextlib import suppress from fractions import gcd import math -import gmusicapi as gpm import aiohttp import discord as d @@ -82,7 +81,7 @@ def dump(obj, filename, *, json=False): settings = setdefault('misc/settings.pkl', default={'del_ctx': [], 'del_resp': [], 'prefixes': {}}) -tasks = setdefault('cogs/tasks.pkl', default={'auto_del': [], 'auto_hrt': [], 'auto_rev': [], 'periodic_gpm': []}) +tasks = setdefault('cogs/tasks.pkl', default={'auto_del': [], 'auto_hrt': [], 'auto_rev': []}) temp = setdefault('temp/temp.pkl', default={'startup': ()}) secrets = setdefault('secrets.json', default={'client_secrets': {'client_id': '', 'client_secret': ''}}, json=True) From ac72df2cea1a2880d4887712ba421f9b7c4c1f57 Mon Sep 17 00:00:00 2001 From: Dylan Dizon Date: Sat, 3 Nov 2018 20:06:14 -0400 Subject: [PATCH 2/2] Prune and clean vestigial packages from Pipfile Also removed Python version requirement entirely --- Pipfile | 23 ++-- Pipfile.lock | 270 +-------------------------------------------- src/utils/utils.py | 1 - 3 files changed, 9 insertions(+), 285 deletions(-) diff --git a/Pipfile b/Pipfile index 8a043ed..476bb4d 100644 --- a/Pipfile +++ b/Pipfile @@ -1,29 +1,20 @@ [[source]] - url = "https://pypi.python.org/simple" verify_ssl = true name = "pypi" [requires] -python_version = "3" [packages] - -"beautifulsoup4" = "*" -lxml = "*" -google-api-python-client = "*" -pyrasite = "*" -"discord.py" = {extras = ["voice"], git = "https://github.com/Rapptz/discord.py", ref = "rewrite"} aiohttp = "*" -"hurry.filesize" = "*" +beautifulsoup4 = "*" +"discord.py" = {extras = ["voice"], git = "https://github.com/Rapptz/discord.py", ref = "rewrite"} gitpython = "*" -gmusicapi = "*" -python-telegram-bot = "*" -requests = "*" -requests-oauthlib = "*" -yarl = "*" +google-api-python-client = "*" hurry = "*" -pynacl = "*" - +"hurry.filesize" = "*" +lxml = "*" +pyrasite = "*" +requests = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 86ba95f..99d8081 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,12 +1,10 @@ { "_meta": { "hash": { - "sha256": "561e8be959cad238a12e39eacbd9ff1f2b843e520ae1b93bc507c21d6ae1ad44" + "sha256": "c6b6bded7d81749dd74473eeb5b42bca29e9c2bff806aa90164523f8678ed5bf" }, "pipfile-spec": 6, - "requires": { - "python_version": "3" - }, + "requires": {}, "sources": [ { "name": "pypi", @@ -44,20 +42,6 @@ "index": "pypi", "version": "==3.4.4" }, - "appdirs": { - "hashes": [ - "sha256:9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92", - "sha256:d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e" - ], - "version": "==1.4.3" - }, - "asn1crypto": { - "hashes": [ - "sha256:2f1adbb7546ed199e3c90ef23ec95c5cf3585bac7d11fb7eb562a3fe89c64e87", - "sha256:9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49" - ], - "version": "==0.24.0" - }, "async-timeout": { "hashes": [ "sha256:0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f", @@ -95,43 +79,6 @@ ], "version": "==2018.10.15" }, - "cffi": { - "hashes": [ - "sha256:151b7eefd035c56b2b2e1eb9963c90c6302dc15fbd8c1c0a83a163ff2c7d7743", - "sha256:1553d1e99f035ace1c0544050622b7bc963374a00c467edafac50ad7bd276aef", - "sha256:1b0493c091a1898f1136e3f4f991a784437fac3673780ff9de3bcf46c80b6b50", - "sha256:2ba8a45822b7aee805ab49abfe7eec16b90587f7f26df20c71dd89e45a97076f", - "sha256:3bb6bd7266598f318063e584378b8e27c67de998a43362e8fce664c54ee52d30", - "sha256:3c85641778460581c42924384f5e68076d724ceac0f267d66c757f7535069c93", - "sha256:3eb6434197633b7748cea30bf0ba9f66727cdce45117a712b29a443943733257", - "sha256:495c5c2d43bf6cebe0178eb3e88f9c4aa48d8934aa6e3cddb865c058da76756b", - "sha256:4c91af6e967c2015729d3e69c2e51d92f9898c330d6a851bf8f121236f3defd3", - "sha256:57b2533356cb2d8fac1555815929f7f5f14d68ac77b085d2326b571310f34f6e", - "sha256:770f3782b31f50b68627e22f91cb182c48c47c02eb405fd689472aa7b7aa16dc", - "sha256:79f9b6f7c46ae1f8ded75f68cf8ad50e5729ed4d590c74840471fc2823457d04", - "sha256:7a33145e04d44ce95bcd71e522b478d282ad0eafaf34fe1ec5bbd73e662f22b6", - "sha256:857959354ae3a6fa3da6651b966d13b0a8bed6bbc87a0de7b38a549db1d2a359", - "sha256:87f37fe5130574ff76c17cab61e7d2538a16f843bb7bca8ebbc4b12de3078596", - "sha256:95d5251e4b5ca00061f9d9f3d6fe537247e145a8524ae9fd30a2f8fbce993b5b", - "sha256:9d1d3e63a4afdc29bd76ce6aa9d58c771cd1599fbba8cf5057e7860b203710dd", - "sha256:a36c5c154f9d42ec176e6e620cb0dd275744aa1d804786a71ac37dc3661a5e95", - "sha256:a6a5cb8809091ec9ac03edde9304b3ad82ad4466333432b16d78ef40e0cce0d5", - "sha256:ae5e35a2c189d397b91034642cb0eab0e346f776ec2eb44a49a459e6615d6e2e", - "sha256:b0f7d4a3df8f06cf49f9f121bead236e328074de6449866515cea4907bbc63d6", - "sha256:b75110fb114fa366b29a027d0c9be3709579602ae111ff61674d28c93606acca", - "sha256:ba5e697569f84b13640c9e193170e89c13c6244c24400fc57e88724ef610cd31", - "sha256:be2a9b390f77fd7676d80bc3cdc4f8edb940d8c198ed2d8c0be1319018c778e1", - "sha256:ca1bd81f40adc59011f58159e4aa6445fc585a32bb8ac9badf7a2c1aa23822f2", - "sha256:d5d8555d9bfc3f02385c1c37e9f998e2011f0db4f90e250e5bc0c0a85a813085", - "sha256:e55e22ac0a30023426564b1059b035973ec82186ddddbac867078435801c7801", - "sha256:e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4", - "sha256:ecbb7b01409e9b782df5ded849c178a0aa7c906cf8c5a67368047daab282b184", - "sha256:ed01918d545a38998bfa5902c7c00e0fee90e957ce036a4000a88e3fe2264917", - "sha256:edabd457cd23a02965166026fd9bfd196f4324fe6032e866d0f3bd0301cd486f", - "sha256:fdf1c1dc5bafc32bc5d08b054f94d659422b05aba244d6be4ddc1c72d9aa70fb" - ], - "version": "==1.11.5" - }, "chardet": { "hashes": [ "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", @@ -139,37 +86,6 @@ ], "version": "==3.0.4" }, - "cryptography": { - "hashes": [ - "sha256:02602e1672b62e803e08617ec286041cc453e8d43f093a5f4162095506bc0beb", - "sha256:10b48e848e1edb93c1d3b797c83c72b4c387ab0eb4330aaa26da8049a6cbede0", - "sha256:17db09db9d7c5de130023657be42689d1a5f60502a14f6f745f6f65a6b8195c0", - "sha256:227da3a896df1106b1a69b1e319dce218fa04395e8cc78be7e31ca94c21254bc", - "sha256:2cbaa03ac677db6c821dac3f4cdfd1461a32d0615847eedbb0df54bb7802e1f7", - "sha256:31db8febfc768e4b4bd826750a70c79c99ea423f4697d1dab764eb9f9f849519", - "sha256:4a510d268e55e2e067715d728e4ca6cd26a8e9f1f3d174faf88e6f2cb6b6c395", - "sha256:6a88d9004310a198c474d8a822ee96a6dd6c01efe66facdf17cb692512ae5bc0", - "sha256:76936ec70a9b72eb8c58314c38c55a0336a2b36de0c7ee8fb874a4547cadbd39", - "sha256:7e3b4aecc4040928efa8a7cdaf074e868af32c58ffc9bb77e7bf2c1a16783286", - "sha256:8168bcb08403ef144ff1fb880d416f49e2728101d02aaadfe9645883222c0aa5", - "sha256:8229ceb79a1792823d87779959184a1bf95768e9248c93ae9f97c7a2f60376a1", - "sha256:8a19e9f2fe69f6a44a5c156968d9fc8df56d09798d0c6a34ccc373bb186cee86", - "sha256:8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6", - "sha256:be495b8ec5a939a7605274b6e59fbc35e76f5ad814ae010eb679529671c9e119", - "sha256:dc2d3f3b1548f4d11786616cf0f4415e25b0fbecb8a1d2cd8c07568f13fdde38", - "sha256:e4aecdd9d5a3d06c337894c9a6e2961898d3f64fe54ca920a72234a3de0f9cb3", - "sha256:e79ab4485b99eacb2166f3212218dd858258f374855e1568f728462b0e6ee0d9", - "sha256:f995d3667301e1754c57b04e0bae6f0fa9d710697a9f8d6712e8cca02550910f" - ], - "version": "==2.3.1" - }, - "decorator": { - "hashes": [ - "sha256:2c51dff8ef3c447388fe5e4453d24a2bf128d3a4c32af3fabef1f01c6851ab82", - "sha256:c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c" - ], - "version": "==4.3.0" - }, "discord-py": { "extras": [ "voice" @@ -190,12 +106,6 @@ ], "version": "==0.6.2" }, - "future": { - "hashes": [ - "sha256:67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8" - ], - "version": "==0.17.1" - }, "gitdb2": { "hashes": [ "sha256:83361131a1836661a155172932a13c08bda2db3674e4caa32368aa6eb02f38c2", @@ -211,13 +121,6 @@ "index": "pypi", "version": "==2.1.11" }, - "gmusicapi": { - "hashes": [ - "sha256:6ffa3892ee39a110e48a383b2e571a72a12109bf978985020fe56e334e45c72c" - ], - "index": "pypi", - "version": "==11.0.3" - }, "google-api-python-client": { "hashes": [ "sha256:5d5cb02c6f3112c68eed51b74891a49c0e35263380672d662f8bfe85b8114d7c", @@ -240,12 +143,6 @@ ], "version": "==0.0.3" }, - "gpsoauth": { - "hashes": [ - "sha256:1c3f45824d45ac3d06b9d9a0c0eccafe1052505d31ac9a698aef8b00fb0dfc37" - ], - "version": "==0.4.1" - }, "httplib2": { "hashes": [ "sha256:e71daed9a0e6373642db61166fa70beecc9bf04383477f84671348c02a04cbdf" @@ -309,20 +206,6 @@ "index": "pypi", "version": "==4.2.5" }, - "mechanicalsoup": { - "hashes": [ - "sha256:2712ec0f3087cbc719c6c3dfb317a05800ff14fcdbfa67a2f9f6e07226e7a94c", - "sha256:bf53141b956ecf2c79d932a6b92f3df0dcf057019efd8e3fd7d4008def45e74a" - ], - "version": "==0.11.0" - }, - "mock": { - "hashes": [ - "sha256:5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1", - "sha256:b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba" - ], - "version": "==2.0.0" - }, "multidict": { "hashes": [ "sha256:05eeab69bf2b0664644c62bd92fabb045163e5b8d4376a31dfb52ce0210ced7b", @@ -357,60 +240,6 @@ ], "version": "==4.4.2" }, - "mutagen": { - "hashes": [ - "sha256:2ea9c900a05fa7f5f4c5bd9fc1475d7d576532e13b2f79b694452b997ff67200" - ], - "version": "==1.41.1" - }, - "oauth2client": { - "hashes": [ - "sha256:b8a81cc5d60e2d364f0b1b98f958dbd472887acaf1a5b05e21c28c31a2d6d3ac", - "sha256:d486741e451287f69568a4d26d70d9acd73a2bbfa275746c535b4209891cccc6" - ], - "version": "==4.1.3" - }, - "oauthlib": { - "hashes": [ - "sha256:ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162", - "sha256:d883b36b21a6ad813953803edfa563b1b579d79ca758fe950d1bc9e8b326025b" - ], - "version": "==2.1.0" - }, - "pbr": { - "hashes": [ - "sha256:8fc938b1123902f5610b06756a31b1e6febf0d105ae393695b0c9d4244ed2910", - "sha256:f20ec0abbf132471b68963bb34d9c78e603a5cf9e24473f14358e66551d47475" - ], - "version": "==5.1.0" - }, - "proboscis": { - "hashes": [ - "sha256:b822b243a7c82030fce0de97bdc432345941306d2c24ef227ca561dd019cd238" - ], - "version": "==1.2.6.0" - }, - "protobuf": { - "hashes": [ - "sha256:10394a4d03af7060fa8a6e1cbf38cea44be1467053b0aea5bbfcb4b13c4b88c4", - "sha256:1489b376b0f364bcc6f89519718c057eb191d7ad6f1b395ffd93d1aa45587811", - "sha256:1931d8efce896981fe410c802fd66df14f9f429c32a72dd9cfeeac9815ec6444", - "sha256:196d3a80f93c537f27d2a19a4fafb826fb4c331b0b99110f985119391d170f96", - "sha256:46e34fdcc2b1f2620172d3a4885128705a4e658b9b62355ae5e98f9ea19f42c2", - "sha256:4b92e235a3afd42e7493b281c8b80c0c65cbef45de30f43d571d1ee40a1f77ef", - "sha256:574085a33ca0d2c67433e5f3e9a0965c487410d6cb3406c83bdaf549bfc2992e", - "sha256:59cd75ded98094d3cf2d79e84cdb38a46e33e7441b2826f3838dcc7c07f82995", - "sha256:5ee0522eed6680bb5bac5b6d738f7b0923b3cafce8c4b1a039a6107f0841d7ed", - "sha256:65917cfd5da9dfc993d5684643063318a2e875f798047911a9dd71ca066641c9", - "sha256:685bc4ec61a50f7360c9fd18e277b65db90105adbf9c79938bd315435e526b90", - "sha256:92e8418976e52201364a3174e40dc31f5fd8c147186d72380cbda54e0464ee19", - "sha256:9335f79d1940dfb9bcaf8ec881fb8ab47d7a2c721fb8b02949aab8bbf8b68625", - "sha256:a7ee3bb6de78185e5411487bef8bc1c59ebd97e47713cba3c460ef44e99b3db9", - "sha256:ceec283da2323e2431c49de58f80e1718986b79be59c266bb0509cbf90ca5b9e", - "sha256:fcfc907746ec22716f05ea96b7f41597dfe1a1c088f861efb8a0d4f4196a6f10" - ], - "version": "==3.6.1" - }, "py": { "hashes": [ "sha256:0f2d585d22050e90c7d293b6451c83db097df77871974d90efd5a30dc12fcde3", @@ -432,70 +261,6 @@ ], "version": "==0.2.2" }, - "pycparser": { - "hashes": [ - "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" - ], - "version": "==2.19" - }, - "pycryptodomex": { - "hashes": [ - "sha256:02c358fa2445821d110857266e4e400f110054694636efe678dc60ba22a1aaef", - "sha256:09989c8a1b83e576d02ad77b9b019648648c569febca41f58fa04b9d9fdd1e8f", - "sha256:0f8fe28aec591d1b86af596c9fc5f75fc0204fb1026188a44e5e1b199780f1e5", - "sha256:0fb58c2065030a5381f3c466aaa7c4de707901badad0d6a0575952bb10e6c35f", - "sha256:0fb9f3e6b28a280436afe9192a9957c7f56e20ceecb73f2d7db807368fdf3aaf", - "sha256:12ff38a68bbd743407018f9dd87d4cc21f9cb28fe2d8ba93beca004ada9a09ff", - "sha256:1650143106383bae79cbbda3701fd9979d0a624dba2ec2fa63f88cae29dd7174", - "sha256:20a646cd0e690b07b7da619bc5b3ee1467243b2e32dfff579825c3ad5d7637ab", - "sha256:284779f0908682657adb8c60d8484174baa0d2620fb1df49183be6e2e06e73ce", - "sha256:2f3ce5bfe81d975c45e4a3cbe2bef15b809acc24f952f5f6aa67c2ae3c1a6808", - "sha256:30ac12f0c9ac8332cc76832fea88a547b49ef60c31f74697ee2584f215723d4f", - "sha256:4f038b815d66dea0b1d4286515d96474204e137eb5d883229616781865902789", - "sha256:57199a867b9991b1950f438b788e818338cee8ed8698e2eebdc5664521ad92a9", - "sha256:5c5349385e9863e3bba6804899f4125c8335f66d090e892d6a5bb915f5c89d4c", - "sha256:5d546fac597b5007d5ff38c50c9031945057a6a6fa1ab7585058165d370ea202", - "sha256:614eddfa0cf325e49b5b803fcb41c9334de79c4b18bf8de07e7737e1efc1d2b9", - "sha256:82ae66244824d50b2b657c32e5912fde70a6e36f41e61f2869151f226204430d", - "sha256:96a733f3be325fb17c2ba79648e85ab446767af3dc3b396f1404b9397aa28fe5", - "sha256:9c3834d27c1cff84e2a5c218e373d80ebbb3edca81912656f16137f7f97e58e0", - "sha256:9f11823636128acbe4e17c35ff668f4d0a9f3133450753a0675525b6413aa1b0", - "sha256:a3f9ad4e3f90f14707776f13b886fbac491ebe65d96a64f3ce0b378e167c3bbf", - "sha256:a89dee72a0f5024cc1cbaf85535eee8d14e891384513145d2f368b5c481dcd54", - "sha256:ccadde651e712093052286ad9ee27f5aa5f657ca688a1bf6d5c41ade709467f3", - "sha256:ced9ea10977dd52cb1b936a92119fc38fcdc5eaa4148f925ef22bbf0f0d4a5bd", - "sha256:eb0c6d3b91d55e3481158ecf77f3963c1725454fdcf5b79302c27c1c9c0d2c2a", - "sha256:f6714569a4039287972c672a8bd4b8d7dc78a601def8b31ffa39cd2fec00cb4b", - "sha256:fa4036582c8755259d4b8f4fe203ae534b7b187dcea143ab53a24e0f3931d547", - "sha256:fb31bb0c8301e5a43d8d7aad22acabef65f28f7ab057eaeb2c21433309cc41e8" - ], - "version": "==3.7.0" - }, - "pynacl": { - "hashes": [ - "sha256:05c26f93964373fc0abe332676cb6735f0ecad27711035b9472751faa8521255", - "sha256:0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c", - "sha256:0d0a8171a68edf51add1e73d2159c4bc19fc0718e79dec51166e940856c2f28e", - "sha256:1c780712b206317a746ace34c209b8c29dbfd841dfbc02aa27f2084dd3db77ae", - "sha256:2424c8b9f41aa65bbdbd7a64e73a7450ebb4aa9ddedc6a081e7afcc4c97f7621", - "sha256:2d23c04e8d709444220557ae48ed01f3f1086439f12dbf11976e849a4926db56", - "sha256:30f36a9c70450c7878053fa1344aca0145fd47d845270b43a7ee9192a051bf39", - "sha256:37aa336a317209f1bb099ad177fef0da45be36a2aa664507c5d72015f956c310", - "sha256:4943decfc5b905748f0756fdd99d4f9498d7064815c4cf3643820c9028b711d1", - "sha256:57ef38a65056e7800859e5ba9e6091053cd06e1038983016effaffe0efcd594a", - "sha256:5bd61e9b44c543016ce1f6aef48606280e45f892a928ca7068fba30021e9b786", - "sha256:6482d3017a0c0327a49dddc8bd1074cc730d45db2ccb09c3bac1f8f32d1eb61b", - "sha256:7d3ce02c0784b7cbcc771a2da6ea51f87e8716004512493a2b69016326301c3b", - "sha256:a14e499c0f5955dcc3991f785f3f8e2130ed504fa3a7f44009ff458ad6bdd17f", - "sha256:a39f54ccbcd2757d1d63b0ec00a00980c0b382c62865b61a505163943624ab20", - "sha256:aabb0c5232910a20eec8563503c153a8e78bbf5459490c49ab31f6adf3f3a415", - "sha256:bd4ecb473a96ad0f90c20acba4f0bf0df91a4e03a1f4dd6a4bdc9ca75aa3a715", - "sha256:e2da3c13307eac601f3de04887624939aca8ee3c9488a0bb0eca4fb9401fc6b1", - "sha256:f67814c38162f4deb31f68d590771a29d5ae3b1bd64b75cf232308e5c74777e0" - ], - "index": "pypi", - "version": "==1.3.0" - }, "pyrasite": { "hashes": [ "sha256:e5f7a36a04379d00a46688c60a8e9bbba7c807526a9252a60cbed8de701f6ccf" @@ -503,21 +268,6 @@ "index": "pypi", "version": "==2.0" }, - "python-dateutil": { - "hashes": [ - "sha256:063df5763652e21de43de7d9e00ccf239f953a832941e37be541614732cdfc93", - "sha256:88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02" - ], - "version": "==2.7.5" - }, - "python-telegram-bot": { - "hashes": [ - "sha256:78695b1f6e147e9b360ccfb1ac92b542cab27870ccaf04065a88ee601ffa58b6", - "sha256:cca4e32ebb8da7fdf35ab2fa2b3edd441211364819c5592fc253acdb7561ea5b" - ], - "index": "pypi", - "version": "==11.1.0" - }, "requests": { "hashes": [ "sha256:99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c", @@ -526,14 +276,6 @@ "index": "pypi", "version": "==2.20.0" }, - "requests-oauthlib": { - "hashes": [ - "sha256:8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f", - "sha256:e21232e2465808c0e892e0e4dbb8c2faafec16ac6dc067dd546e9b466f3deac8" - ], - "index": "pypi", - "version": "==1.0.0" - }, "rsa": { "hashes": [ "sha256:14ba45700ff1ec9eeb206a2ce76b32814958a98e372006c8fb76ba820211be66", @@ -570,13 +312,6 @@ ], "version": "==1.24.1" }, - "validictory": { - "hashes": [ - "sha256:3a87b84658592f75f37d6bab77ac223774c9989dc7349c8aad19a424770835ba", - "sha256:eb7ec9d811f3cf062fb943ce369a9b34a9f291037217ecf5a40a5f2421d29c0a" - ], - "version": "==1.1.2" - }, "yarl": { "hashes": [ "sha256:2556b779125621b311844a072e0ed367e8409a18fa12cbd68eb1258d187820f9", @@ -589,7 +324,6 @@ "sha256:f17495e6fe3d377e3faac68121caef6f974fcb9e046bc075bcff40d8e5cc69a4", "sha256:f85900b9cca0c67767bb61b2b9bd53208aaa7373dae633dbe25d179b4bf38aa7" ], - "index": "pypi", "version": "==1.2.6" } }, diff --git a/src/utils/utils.py b/src/utils/utils.py index 73bb1ee..88c595f 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -83,7 +83,6 @@ def dump(obj, filename, *, json=False): settings = setdefault('misc/settings.pkl', default={'del_ctx': [], 'del_resp': [], 'prefixes': {}}) tasks = setdefault('cogs/tasks.pkl', default={'auto_del': [], 'auto_hrt': [], 'auto_rev': []}) temp = setdefault('temp/temp.pkl', default={'startup': ()}) -secrets = setdefault('secrets.json', default={'client_secrets': {'client_id': '', 'client_secret': ''}}, json=True) cogs = {} color = d.Color(0x1A1A1A)