コード例 #1
0
ファイル: giftSniper.py プロジェクト: caiocinel/Selfium
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'] }")
コード例 #2
0
ファイル: richPresence.py プロジェクト: caiocinel/Selfium
async def setPresenceURL(ctx, *, url):
    notify = Notify(ctx=ctx, title='Presence URL')
    notify.prepair()
    cfg['activity']['url'] = url
    if (cfg['activity']['type']) != 1:
        notify.alert(
            content=
            'Streaming will only be displayed if presence is set to "Streaming"'
        )
    await updatePresence(notify)
コード例 #3
0
async def raid(ctx):
    notify = Notify(ctx=ctx, title='Confirm Raid')
    if str(ctx.guild.id) in ignore.getIgnore():
        notify.error(content='The server {} is being ignored'.format(ctx.guild.name))
        return
    try:
        notify.alert(content=f'Confirm the command by typing *{ctx.guild.name}*')
        check = await client.wait_for('message', check=lambda m: m.content == ctx.guild.name, timeout=60)
        await check.delete()
        notify.success(title='Raiding Server',content='Starting Raid...')
        await banAll(ctx)
        await deleteAllChannels(ctx)
        await deleteAllRoles(ctx)
        notify.success(content='Raid Complete')  
    except Exception as e:
        print(e)
        notify.error(content='Something goes wrong, verify the console logs!')
        
コード例 #4
0
async def muteAllServers(ctx):
    notify = Notify(ctx=ctx, title='Muting All Servers...')
    notify.prepair()
    muted_servers = 0
    Embed = discord.Embed(
        description=
        f"> Servers mutated until now: **{int(muted_servers)}** / **{len(client.guilds)}**.\n> Current Status: **Starting...**",
        color=discord.Colour.blue())
    Message = await sendEmbed(ctx, Embed)
    for guild in client.guilds:
        if str(guild.id) in ignore.getIgnore():
            notify.alert(
                content='The server {} is being ignored'.format(guild.name))
            return
        try:
            await guild.mute()
            muted_servers = muted_servers + 1

            if (Message.embeds):
                Embed = discord.Embed(
                    description=
                    f"> Servers mutated until now: **{int(muted_servers)}** / **{len(client.guilds)}**.\n> Current Status: **In progress...**",
                    color=discord.Colour.orange())
                await Message.edit(embed=Embed)
            else:
                await Message.edit(
                    f"> Servers mutated until now: **{int(muted_servers)}** / **{len(client.guilds)}**.\n> Current Status: **Starting...**"
                )

            await asyncio.sleep(0.3)
        except Exception as e:
            error(e)
            pass

    notify.success(
        content=
        f"> Total number of mutated servers: **{int(muted_servers)}** / **{len(client.guilds)}**.\n> Current Status: **All Done!**"
    )
コード例 #5
0
ファイル: leaveAllServers.py プロジェクト: caiocinel/Selfium
async def leaveServers(ctx):
    Total = 0
    notify = Notify(ctx=ctx, title='Leaving All Servers')
    notify.prepair()
    for server in client.guilds:
        if str(server.id) in ignore.getIgnore():
            notify.alert(
                content='The server {} is being ignored'.format(server.name))
            return
        try:
            await server.leave()
            Total = Total + 1
        except Exception as e:
            if (e.text == 'Invalid Guild'):
                notify.exception(
                    content=
                    'You probably own this server, or this server is invalid or blocked.'
                )
            error(e)
            pass
    notify.success(
        content=f'You are out of a total of {Total} servers.'
    )  #How the f**k will this be sent if it leaves all servers???