Guest User

Untitled

a guest
Dec 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. """
  2. ----------
  3. MagicLeague3 > core_utils.py
  4.  
  5. CLASSIFIED: MagicLeague3 is proprietary code and cannot be distributed or modified in any way.
  6. APPENDED: MAGICLEAGUE3 SOURCE CODE HAS BEEN DECLASSIFIED AND IS AVAILABLE FOR PUBLIC USE!
  7. AUTHOR: Feven Kitsune <REMOVED>
  8. ----------
  9. """
  10.  
  11. # Discord.py imports:
  12. import discord # Discord.py
  13. from discord.ext import commands # Discord.ext commands
  14.  
  15. class core_utils():
  16.  
  17. """
  18. ----------
  19. Constructor
  20. ----------
  21. """
  22.  
  23. def __init__(self, client):
  24. self.client = client
  25.  
  26.  
  27. """
  28. ----------
  29. Commands
  30. ----------
  31. """
  32.  
  33.  
  34. @commands.command(name="ping", brief='Ping the bot', description='A simple ping command. Checks if the bot is running!', usage='<string>')
  35. async def ping (self, ctx, *args):
  36.  
  37. embed = discord.Embed(color=0xEEEEEE)
  38. embed.set_footer(text="Invoked by: " + ctx.author.name)
  39.  
  40. if not args:
  41. embed.add_field(name="Command: ping", value=":wave:", inline=False)
  42. else:
  43. embed.add_field(name="Command: ping", value=":wave: " + str(' '.join(args)), inline=False)
  44.  
  45. await ctx.send(embed=embed)
  46.  
  47.  
  48. def setup(client):
  49. client.add_cog(core_utils(client))
Add Comment
Please, Sign In to add comment