Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import random as r
- import time
- TOKEN = 'NDQ5MDY3NzY4MDA5MTk1NTMw.DefTKQ.l2YKFjq4iXUgFT8Nmaw3f3kQ9U0'
- #todo, Make a !help command
- client = discord.Client()
- master = "Sadist, not Satyr#8429"
- @client.event
- async def on_message(message):
- # we do not want the bot to reply to itself
- if message.author == client.user:
- return
- try:
- if message.content.startswith('!hello'):
- msg = 'Hello {0.author.mention}'.format(message)
- await client.send_message(message.channel, msg)
- if message.content.startswith('!test'):
- print(message.author)
- if str(message.author) == str(master):
- msg = 'Hello Master!'.format(message)
- await client.send_message(message.channel, msg)
- else:
- await client.send_message(message.channel, 'Ummm, Im sorry, Who are you again?')
- if message.content == ('!master'):
- if str(message.author) == str(master):
- msg = 'You are my master~!'.format(message)
- await client.send_message(message.channel, msg)
- else:
- await client.send_message(message.channel, master + ' is my master!\n But I like you too...')
- if str(message.content).lower() == ('goodnight bot'):
- await client.send_message(message.channel, 'Goodnight Human.')
- msgsplit = str(message.content).split(' ')
- if 'suicide' in msgsplit:
- await client.send_message(message.channel, 'Hey you shouldnt joke about that!')
- if 'kill' in msgsplit and ('yourself' in msgsplit or 'urself' in msgsplit):
- await client.send_message(message.channel, 'That is not nice to say')
- if msgsplit[0].lower() == 'im' or msgsplit[0].lower() == "i'm":
- if len(msgsplit) < 5:
- msg = 'Hi ' + str(message.content)[str(message.content).find(' ')+1:] + "! I'm " + client.user.name
- await client.send_message(message.channel, msg)
- if message.content.startswith('!flip'):
- if r.randrange(2) == 0:
- await client.send_message(message.channel, 'The coin was HEADS')
- else:
- await client.send_message(message.channel, 'The coin was TAILS')
- if msgsplit[0].lower() == '!owo':
- msg = str(message.content)[str(message.content).find(' '):].replace('l','w')
- msg = msg.replace('r','w')
- msg = msg.replace('q','qw')
- await client.send_message(message.channel, msg + ' CwC OwO')
- except NameError:
- msg = 'OOPSIE WOOPSIE!! Uwu We made a fucky wucky!! \nA wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!'.format(message)
- await client.send_message(message.channel, msg)
- @client.event
- async def on_ready():
- print('Logged in as')
- print(client.user.name)
- print(client.user.id)
- print('------')
- client.run(TOKEN)
- #Read the Docs
- #https://discordpy.readthedocs.io/en/latest/api.html
- #############################################################
- ## How to auth check
- # if str(message.author) == str(master):
- ## How to have bot @ mention
- # msg = 'Hello {0.author.mention}'.format(message)
- # await client.send_message(message.channel, msg)
- ## How to message
- # wait client.send_message(message.author, 'You a bitch')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement