|
|
@ -3,6 +3,8 @@ import traceback |
|
|
|
import asyncio, aiohttp |
|
|
|
import discord |
|
|
|
|
|
|
|
from ..bot import DiscordClient |
|
|
|
|
|
|
|
class Extension: |
|
|
|
DONATE_VIP_ROLE = 684725881557614689 |
|
|
|
FREE_VIP_ROLE = 1084187245025689630 |
|
|
@ -10,7 +12,7 @@ class Extension: |
|
|
|
|
|
|
|
TRACK_WEBHOOK = 819627591501479937 |
|
|
|
|
|
|
|
core = None |
|
|
|
core: DiscordClient = None |
|
|
|
def __init__(self, core): |
|
|
|
self.core = core |
|
|
|
self.MAIN_GUILD_ID = core.main_server_id |
|
|
@ -23,7 +25,7 @@ class Extension: |
|
|
|
await self.updater() |
|
|
|
return |
|
|
|
|
|
|
|
async def task(self, timeout = 60): |
|
|
|
async def task(self, timeout = 300): |
|
|
|
await self.core.wait_until_ready() |
|
|
|
while True: |
|
|
|
await self.updater() |
|
|
@ -47,7 +49,7 @@ class Extension: |
|
|
|
return await response.json() |
|
|
|
|
|
|
|
async def checkRoles(self, role_id): |
|
|
|
current_members = self.core.get_guild(self.MAIN_GUILD_ID).get_role(role_id).members |
|
|
|
current_members = (await self.core.fetch_guild(self.MAIN_GUILD_ID)).get_role(role_id).members |
|
|
|
if role_id == self.DONATE_VIP_ROLE: |
|
|
|
active_vips = await self.getVIP_DiscordIDs() |
|
|
|
elif role_id == self.FREE_VIP_ROLE: |
|
|
|