File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 8
8
import sys
9
9
import json
10
10
from pkg_resources import parse_version
11
+ import random
11
12
12
13
import discord
13
14
from discord .ext import commands
@@ -36,9 +37,14 @@ class Plugins(commands.Cog):
36
37
"""
37
38
def __init__ (self , bot ):
38
39
self .bot = bot
40
+ self .registry = {}
39
41
self .bot .loop .create_task (self .download_initial_plugins ())
40
- with open ('plugins/registry.json' ) as f :
41
- self .registry = json .load (f )
42
+ self .bot .loop .create_task (self .populate_registry ())
43
+
44
+ async def populate_registry (self ):
45
+ url = 'https://raw.githubusercontent.com/kyb3r/modmail/master/plugins/registry.json'
46
+ async with self .bot .session .get (url ) as resp :
47
+ self .registry = json .loads (await resp .text ())
42
48
43
49
@staticmethod
44
50
def _asubprocess_run (cmd ):
You can’t perform that action at this time.
0 commit comments