Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def decrypt(decryptmessage):
- decrypted = ""
- for char in decryptmessage:
- if char in alphabet:
- newpos = (alphabet.find(char) - shift) % 26
- decrypted += alphabet[newpos]
- else:
- decrypted += char
- return decrypted
- @client.event
- async def on_ready():
- print("-+-+-+-+-+-+-+-+-+-+-+-+-+-")
- print("BOT is UP and RUNNING.")
- print("Name: " + client.user.name)
- print("ID: " + client.user.id)
- print("-+-+-+-+-+-+-+-+-+-+-+-+-+-")
- @client.command(pass_context=True)
- async def help(ctx):
- embed = discord.Embed(title="Jump-Rope in Python", description="Multi-Purpose Bot with multiple commands...", color=0xA52A2A)
- embed.add_field(name="^help", value="Opens this menu.", inline=False)
- embed.add_field(name="^cf", value="Flips a coin to settle an arguement!", inline=False)
- embed.add_field(name="^clear (value)", value="Clears messages in the given channel by (value).", inline=False)
- embed.add_field(name="^ping", value="Returns pong!", inline=False)
- embed.add_field(name="^dice", value="Rolls a dice!", inline=False)
- embed.add_field(name="^randomn var1 var2", value="Choses a random number between var1 and var2.", inline=False)
- embed.add_field(name="^e message", value="Encrypts a message.", inline=False)
- embed.add_field(name="^d message", value="Decrypts a message.", inline=False)
- embed.add_field(name="^add a b", value="adds two numbers.", inline=False)
- embed.add_field(name="^subtract a b", value="subtracts two numbers.", inline=False)
- embed.add_field(name="^multiply a b", value="multiplies two numbers.", inline=False)
- embed.add_field(name="^divide a b", value="divides two numbers.", inline=False)
- embed.add_field(name="^passgene (length)", value="Generates a random alphanumeric password.", inline=False)
- embed.add_field(name="^fortnite (pc, xbox, ps) (username)", value="Gets the fortnite stats of the player on a given console.", inline=False)
- embed.add_field(name="^sort (a or d) (list)", value="Sorts a list in either descending or ascending order. (for list, 1,2,5,3,6)", inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def invite(ctx):
- @client.command(pass_context=True)
- async def fortnite(ctx, console: str, name: str):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- urlpc = "https://fortnitetracker.com/profile/pc/"
- urlxbox = "https://fortnitetracker.com/profile/xbox/"
- urlps = "https://fortnitetracker.com/profile/psn/"
- if console == "pc":
- embed.add_field(name="Fortnite Module:", value=urlpc + name, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- elif console == "xbox":
- embed.add_field(name="Fortnite Module:", value=urlxbox + name, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- elif console == "ps":
- embed.add_field(name="Fortnite Module:", value=urlps + name, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def passgene(ctx, length: int):
- embed = discord.Embed(title="", descrption="", color = 0xA52A2A)
- abcpass = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- pick = random.randint(1,62)
- @client.command(pass_context=True)
- async def dice(ctx):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- diceroll = random.randint(1,6)
- if diceroll == 1:
- embed.set_image(url="https://media.discordapp.net/attachments/459055554229174292/459384018165825547/graffiti_number_1.png?width=375&height=375")
- await client.send_message(ctx.message.channel, embed=embed)
- elif diceroll == 2:
- embed.set_image(url="https://media.discordapp.net/attachments/459055554229174292/459383194450657282/ca6e4320566287.png?width=375&height=375")
- await client.send_message(ctx.message.channel, embed=embed)
- elif diceroll == 3:
- embed.set_image(url="https://media.discordapp.net/attachments/459055554229174292/459383617454342154/graffiti_number_3.png?width=375&height=375")
- await client.send_message(ctx.message.channel, embed=embed)
- elif diceroll == 4:
- embed.set_image(url="https://media.discordapp.net/attachments/459055554229174292/459383724430065664/graffiti_number_4.png?width=375&height=375")
- await client.send_message(ctx.message.channel, embed=embed)
- elif diceroll == 5:
- embed.set_image(url="https://media.discordapp.net/attachments/459055554229174292/459383789622132737/graffiti_number_5.png?width=375&height=375")
- await client.send_message(ctx.message.channel, embed=embed)
- else:
- embed.set_image(url="https://media.discordapp.net/attachments/459055554229174292/459383842017509376/graffiti_number_6.png?width=375&height=375")
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def sort(ctx, choice: str, sortlist: str):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- if choice == "a":
- listascend = sortlist.split(",")
- integerascendlist = []
- for numbers in listascend:
- integerascendlist.append(float(numbers))
- integerascendlist.sort()
- embed.add_field(name="Sort Ascend Module:", value=integerascendlist, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- elif choice == "d":
- listdescend = sortlist.split(",")
- integerdescendlist = []
- for numbers in listdescend:
- integerdescendlist.append(float(numbers))
- integerdescendlist.sort(reverse=True)
- embed.add_field(name="Sort Descend Module:", value=integerdescendlist, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def randomn(ctx, var1: int, var2: int):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- randomnum = random.randint(var1,var2)
- embed.add_field(name="Randomizer Module:", value=randomnum, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def add(ctx, a: int, b: int):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- embed.add_field(name="Addition Module:", value=a+b, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def subtract(ctx, a: int, b: int):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- embed.add_field(name="Subtraction Module:", value=a-b, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def multiply(ctx, a: int, b: int):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- embed.add_field(name="Multiply Module:", value=a*b, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def divide(ctx, a: int, b: int):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- embed.add_field(name="Division Module:", value=a/b, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def cf(ctx):
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- choice = random.randint(1,2)
- if choice == 1:
- embed.set_image(url="https://media.discordapp.net/attachments/459055554229174292/459365408785563648/Super-Bowl-Coin-Toss-Heads-020316L.png?width=338&height=338")
- await client.send_message(ctx.message.channel, embed=embed)
- else:
- embed.set_image(url="https://cdn.discordapp.com/attachments/459055554229174292/459366194357469184/51NyMaKLydL.png")
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def e(ctx, coded):
- channel = ctx.message.channel
- encryptmessage = (encrypt(coded))
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- embed.add_field(name="Encrypt Module:", value=encryptmessage, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.command(pass_context=True)
- async def d(ctx, codedd):
- channel = ctx.message.channel
- decryptmessage = (decrypt(codedd))
- embed = discord.Embed(title="", description="", color = 0xA52A2A)
- embed.add_field(name="Decrypt Module:", value=decryptmessage, inline=False)
- await client.send_message(ctx.message.channel, embed=embed)
- @client.event
- async def on_message(message):
- await client.process_commands(message)
- if message.content.lower().startswith('^ping'):
- userID = message.author.id
- await client.send_message(message.channel, "pong!")
- @client.command(pass_context=True)
- async def clear(ctx, amount=100):
- channel = ctx.message.channel
- messages = []
- async for message in client.logs_from(channel, limit=int(amount + 1)):
- messages.append(message)
- await client.delete_messages(messages)
- if amount == 1:
- await client.say('message has been deleted.')
- else:
- await client.say('messages have been deleted.')
- client.run("x")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement