Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import asyncio
- import discord
- from discord.ext.commands import Bot
- from discord.ext import commands
- from time import sleep
- import os
- import random
- os.system("color a")
- author = "Glazz#4031"
- trigger = commands.Bot(command_prefix=".")
- #DISCORD LOGGING KEY
- def neatPrint( word ):
- for char in word:
- sleep(0.008)
- sys.stdout.write(char)
- sys.stdout.flush()
- print(" ")
- prefix = "."
- @trigger.event
- async def on_ready():
- neatPrint(">>>>>BOOTUP COMPLETE<<<<<")
- neatPrint("Logged in as " + trigger.user.name)
- neatPrint(">Event log")
- print("_" * 34)
- await trigger.change_presence(game=discord.Game(name="type .author for test"))
- @trigger.event
- async def on_message(message):
- def send( x ):
- return trigger.send_message(message.channel, x)
- #PING COMMAND
- if message.content.startswith(prefix + ("ping").lower()):
- await send(":ping_pong: PONG")
- pinger = str(message.author)
- print(pinger +" pinged")
- #HI COMMAND
- elif message.content.startswith(prefix + ("hi").lower()):
- saluted = str(message.author.name)
- await send(str(message.author.avatar_url))
- await send("Hi " + saluted.capitalize())
- print(str(message.author) + " " + "said hi")
- #MY DAD
- elif message.content.startswith(prefix + "author") and str(message.author) == author:
- await send("You")
- #NOT MY DAD
- elif message.content.startswith(prefix + "author"):
- await send("Not you")
- #SHUTDOWN COMMAND
- if message.content.startswith(prefix + "shutdown") and str(message.author) == author:
- await send("SHUTTING DOWN")
- trigger.close()
- sys.exit()
- elif message.content.startswith(prefix + "shutdown") and str(message.author) != author:
- await send("User lacks authority to issue Shutdown command")
- await send("Have a meme instead")
- await trigger.send_file(message.channel, "E:\memes\deathnote.png")
- elif message.content.startswith(prefix + "test") and str(message.author) == author:
- await trigger.send_file(message.channel, "E:\memes\images_10.jpg")
- #DISCORD KEY
- trigger.run("")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement