Example #1
0
async def logMessages(ctx):
    notify = Notify(ctx=ctx, title='Message Logging')
    notify.prepair()
    cfg['msgLogger'] = not cfg['msgLogger']
    save(cfg)
    notify.success(
        content=f"Message Logger has been set to { cfg['msgLogger'] }")
Example #2
0
async def giftSniper(ctx):
    notify = Notify(ctx=ctx, title='Nitro Snipping')
    notify.prepair()
    cfg['sniperToken']['enabled'] = not cfg['sniperToken']['enabled'] 
    save(cfg)
    if not token(cfg['sniperToken']['token']) and cfg['sniperToken']['enabled']:
        notify.alert(content=f'No valid token has been provided for claim, codes will be claimed in current account and codes stored on file')
    notify.success(content=f"Snipping has been set to { cfg['sniperToken']['enabled'] }")
Example #3
0
async def changeToken(ctx, token):
    notify = Notify(ctx=ctx, title="Changing Token")
    notify.prepair()
    if (token(token)):
        filesystem.cfg['token'] = token
        filesystem.save(filesystem.cfg)
        notify.success(
            content=
            f"Token was successfully changed, use \"{filesystem.cfg['prefix']}reload\" to apply the changes."
        )
    else:
        notify.error(content='The provided token is not valid!')
Example #4
0
async def richpresence(ctx):
    notify = Notify(ctx=ctx, title='Rich Presence')
    notify.prepair()
    cfg['activity']['enabled'] = not cfg['activity']['enabled']
    fileSystem.save(cfg)
    notify.success(
        content=f"Rich Presence has been set to { cfg['activity']['enabled'] }"
    )
    if cfg['activity']['enabled']:
        await updatePresence(notify)
    else:
        await client.change_presence(activity=discord.Activity())
Example #5
0
async def notify(ctx, type: str):
    notify = Notify(ctx=ctx, title='Notify Type')
    notify.prepair()
    if (type == 'embed'):
        cfg['notifyType'] = 'embed'
    elif (type == 'message'):
        cfg['notifyType'] = 'message'
    else:
        notify.error(
            title='Invalid Notify Type',
            content=
            'Available:\n ```embed | message```\nMessages will be used if embeds are not possible'
        )
        return

    save(cfg)
    notify.success(content='Notify type set to: {}'.format(type))
Example #6
0
async def updatePresence(notify=None):
    activityData = dict(name=cfg['activity']['name'],
                        state=cfg['activity']['state'],
                        details=cfg['activity']['details'],
                        type=cfg['activity']['type'],
                        url=cfg['activity']['url'])
    fileSystem.save(cfg)
    if (cfg['activity']['enabled']):
        await client.change_presence(activity=discord.Activity(**activityData))
        if (notify):
            notify.success(
                content='Rich Presence has been updated successfully')
    else:
        if (notify):
            notify.alert(
                content=
                f'Rich Presence is not enabled\n Activate with {cfg["prefix"]}richPresence'
            )