Browse Source

added some command descriptions and laid the foundations for the suck and waifurate changes.

tags/v1.0.0
roxie 6 years ago
parent
commit
b115f4701f
2 changed files with 9 additions and 9 deletions
  1. +5
    -4
      cogs/util.py
  2. +4
    -5
      main.py

+ 5
- 4
cogs/util.py View File

@@ -15,16 +15,14 @@ class Util():
self.bot = Bot

@bot.command(pass_context=True)
async def avatar(self, ctx, user: discord.User = None):
async def avatar(self, ctx, *,user: discord.User = None):
"""
Returns a mentioned users avatar
Example:
{command_prefix}avatar @RoxBot#4170
{command_prefix}avatar RoxBot
"""
if ctx.message.mentions:
user = ctx.message.mentions[0]
elif not user:
if not user:
user = ctx.message.author

url = user.avatar_url
@@ -135,6 +133,9 @@ class Util():

@bot.command(pass_context=True)
async def emote(self, ctx, emote):
"""
Gets a url to the emote given. Useful for downloading emotes.
"""
emoteid = emote.split(":")[-1].strip("<>")
url = "https://discordapp.com/api/emojis/{}.png".format(emoteid)
return await self.bot.say(url)

+ 4
- 5
main.py View File

@@ -73,15 +73,11 @@ async def on_server_remove(server):

@bot.event
async def on_message(message):
# TODO: Check for words for reactions and check blacklist
# TODO: Check for words for reactions
if blacklisted(message.author):
return
return await bot.process_commands(message)

# Bot Debug and Info

# TODO: Add command that has things like uptime in it and is outputted as a rich embed

# Error Handling, thanks for Der Eddy who did most of this stuff. <3

@bot.event
@@ -127,6 +123,9 @@ async def on_command_error(error, ctx):

@bot.command(pass_context=True)
async def about(ctx):
"""
Outputs info about RoxBot, showing uptime, what settings where set in prefs.ini and credits.
"""
user = await bot.get_user_info(load_config.owner)
ownername = user.name + "#" + user.discriminator
em = discord.Embed(title="About Roxbot", colour=load_config.embedcolour, description=load_config.description)

Loading…
Cancel
Save