Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import discord
- from discord.ext import commands
- import time
- import asyncio
- # id = 559392094351917076
- messages = 0
- joined = 0
- bot = commands.Bot(command_prefix="-")
- client = discord.Client()
- def read_token():
- with open("token.txt", "r") as f:
- lines = f.readlines()
- return lines[0].strip()
- token = read_token()
- async def update_stats():
- await client.wait_until_ready()
- global messages, joined
- while not client.is_closed():
- try:
- with open("statts.txt", "a") as f:
- f.write(f"Time: {int(time.time())}, Messages: {messages}, Members Joined: {joined}\n")
- messages = 0
- joined = 0
- await asyncio.sleep(5)
- except Exception as e:
- print(e)
- await asyncio.sleep(5)
- channel_id = 0
- @client.event
- async def on_member_join(member):
- channel = member.guild.get_channel(channel_id)
- await channel.send(random.choice(["a", "b", "c"]))
- @client.event
- async def on_message(message):
- global messages
- messages += 1
- # id = client.get_guild(559392094351917076)
- channel = ["general"]
- kufurler = ["supermice", "SUPERMICE", "SUPERMİCE"]
- for word in kufurler:
- if message.content.count(word) > 0:
- print("someone swore")
- await message.delete()
- if str(message.channel) in channel:
- if message.content == "-link":
- await message.channel.send("github link")
- elif message.content == "-help":
- await message.channel.send(f"""help message""")
- elif message.content == "bot seni seviyorum":
- await message.channel.send(f"""ben seni sevmiyom orospu çocuğu ben utkuyu seviom""")
- elif message.content.find("spotify") != -1:
- await message.channel.send(f"""https://cdn.discordapp.com/attachments/559392094796382208/595274093654310912/unknown.png""")
- elif message.content == "-author":
- await message.channel.send(f"""angel lau#3173""")
- elif message.content.startswith("-truth"):
- reply = random.choice(
- ["şüphesiz", "sanane", "Tabii ki hayır!!", "tekrar sor bu sefer söylicem", "üşeniom",
- "ANLAMADIM TKR SOR?", "SİKTİR GİT.", "EVET", "AŞIK OLDUM",
- "AGA BU SORUYA CEVAP VERMEMİ BEKLEME"])
- await message.channel.send(f"{message.author.mention} {reply}")
- elif message.content.startswith("-random "):
- args = message.content.split(" ")[1:]
- await message.channel.send(random.choice(args))
- client.loop.create_task(update_stats())
- client.run(token)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement