Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import re
- import asyncio
- import random
- import sys
- for arg in sys.argv:
- account = arg
- password = "********"
- client = discord.Client()
- def random_id(length):
- number = '0123456789'
- alpha1 = 'abcdefghijklmnopqrstuvwxyz'
- alpha2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- id = ''
- for i in range(0,length,3):
- id += random.choice(number)
- id += random.choice(alpha1)
- id += random.choice(alpha2)
- return id
- @client.event
- async def on_ready():
- print('Connected!')
- print('Username: ' + client.user.name)
- print('ID: ' + client.user.id)
- await client.accept_invite("https://discord.gg/4dpQ5FH")
- @client.event
- async def on_message(message):
- if message.content.startswith('@rep'):
- msg = '!rep {0.author.mention}'.format(message)
- await client.send_message(message.channel, msg)
- if message.content.startswith('@daily'):
- msg = '!daily {0.author.mention}'.format(message)
- await client.send_message(message.channel, msg)
- if message.content.startswith("@spam"):
- cmd = message.content[len('@spam '):]
- num = re.search(r'\d+', cmd).group()
- textl = re.findall('[^0-9]', cmd)
- text = ''.join(textl)
- if int(num) > 500:
- num = 10
- if text == ' random':
- for i in range(int(num)):
- await asyncio.sleep(0.5)
- await client.send_message(message.channel, random_id(75))
- else:
- for i in range(int(num)):
- await asyncio.sleep(0.5)
- await client.send_message(message.channel, ''.join(text))
- client.run(account,password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement