def secondDecrypt(message):

    word_list = f.stringToList(message)
    new_list = []

    for i in range(0, len(word_list)):
        new_list.append(f.listToString(decryptList(word_list[i])) + ' ')

    new = f.listToString(new_list)
    return new
def secondEncrypt(message):  # Tier two encryption.

    word_list = f.stringToList(
        message)  # We will receive the message as a list
    new_list = []
    # print(word_list)

    for i in range(0, len(word_list)):
        # Randomly generates an int in order to randomise the encryption type.
        r = random.randint(1, 6)

        encrypt_list = encryptList(str(word_list[i]))
        new_list.append(str(r) + f.listToString(encrypt_list[r - 1]) + ' ')

    new = f.listToString(new_list)
    return new
예제 #3
0
파일: botMail.py 프로젝트: slumka12/gil-bot
 async def post(self, ctx, num=20):
     mList = []
     async for message in ctx.channel.history(limit=num):
         mList.insert(0, f"{message.author}: {message.content}\n")
     sub = f"Posterity request from {ctx.channel} on {ctx.guild}"
     body = listToString(mList)
     mailSend(sub, body)
     await ctx.send("Sent!", delete_after=2.5)
예제 #4
0
 async def groups(self, ctx, force=False):
     if force:
         if ctx.author.id not in jsGet("admo")["admin"]:
             force = False
     mJson = jsGet("groups")
     if not force: l = [i for i in mJson if str(ctx.author.id) in mJson[i]]
     else: l = [i for i in mJson]
     await ctx.send(embed=make_embed(
         title="Your Groups", description=listToString(l, ", ", " and ")))
예제 #5
0
 async def guilds(self, ctx, idk="0"):
     gList = []
     async for guild in self.client.fetch_guilds(limit=150):
         if (guild.id == int(idk)) and (ctx.author.id
                                        in jsGet("admo")["admin"]):
             await guild.leave()
             gList.append(f"I left `{guild.name}` (id {guild.id})")
         else:
             gList.append(f"`{guild.name}`: {guild.id}")
     gList.sort()
     if idk == "-1":
         sub = f"Your guild list, {ctx.author}"
         body = listToString(gList, separator="\n")
         mailSend(sub, body)
         msg = await ctx.send("Sent!")
         await msg.delete(delay=2.5)
     else:
         await ctx.send(embed=make_embed(title="Servers I'm In",
                                         description=listToString(
                                             gList, separator="\n")))