Advertisement
Guest User

adasd

a guest
Jan 16th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.42 KB | None | 0 0
  1. import discord
  2. from discord.ext.commands import Bot
  3. from discord.ext import commands
  4. import asyncio
  5. import time
  6.  
  7. Client = discord.Client ()
  8. client = commands.Bot(command_prefix = "=")
  9.  
  10. @client.event
  11. async def on_ready():
  12.     print("Real Talk is ready for hiqh quality access!")
  13.  
  14. @client.event
  15. async def on_message(message):
  16.     if message.content == "rtgang":
  17.         await client.send_message(message.channel, "Real Talk Gang!")
  18.  
  19.     elif message.content.upper().startswith("=PING"):
  20.         userID = message.author.id
  21.         await client.send_message(message.channel, "<@%s> Pong!" % (userID))
  22.     elif message.content.upper().startswith("=SAY"):
  23.         args = message.content.split(" ")
  24.         #args[0] = ?SAY
  25.         #args[1] = Hey
  26.         #args[2] = There
  27.         #args[1:] = Hey There
  28.         await client.send_message(message.channel, "%s" %(" ".join(args[1:])))
  29.        
  30.     elif message.content.startswith("=about"):
  31.         emb = (discord.Embed(description="This is the Real Talk Bot! It's developed by Parched. :smile:", colour=0xff0000))
  32.         emb.set_author(name="About RT Bot", icon_url="https://cdn.discordapp.com/attachments/520265639680671747/533389224913797122/rtgang.jpeg")
  33.         emb.set_footer(text="Developed by Parched in discord.py, which is a python library.")
  34.         await client.send_message(message.channel, embed=emb)
  35.    
  36.     if message.content.startswith("=help"):
  37.         helpmsg = discord.Embed(description="Here are the commands, prefix is =.", colour=0xff0000)
  38.         helpmsg.set_author(name="Commands", icon_url="https://cdn.discordapp.com/attachments/520265639680671747/533389224913797122/rtgang.jpeg")
  39.         helpmsg.add_field(name="=help", value="Displays all commands.", inline=True)
  40.         helpmsg.add_field(name="=about", value="Just a little information box.", inline=True)
  41.         helpmsg.add_field(name="=say", value="Admins can announce information with it.", inline=True)
  42.         helpmsg.add_field(name="=ping", value="It just says Pong as soon as it gets your message!", inline=True)
  43.         helpmsg.add_field(name="rtgang", value="Just type rtgang in chat, nothing much.", inline=True)
  44.         helpmsg.set_footer(text="Developed by Parched in discord.py, which is a python library.")
  45.         await client.send_message(message.channel, embed=helpmsg)
  46.        
  47.        
  48.        
  49.        
  50.  
  51.  
  52. client.run("NTMzMzczMTcwNDQ3NTQ4NDE2.DxqGtQ.81VR-2nPPwjvUkU44zc_PAgqnJQ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement