Browse Source

updated about command, added it to the docs, and fixed a big with parsing the backup rate.

tags/v2.0.0
Roxie Gibson 5 years ago
parent
commit
ceab32ccc4
3 changed files with 20 additions and 8 deletions
  1. +9
    -0
      docs/commands.md
  2. +10
    -6
      roxbot.py
  3. +1
    -2
      roxbot/__init__.py

+ 9
- 0
docs/commands.md View File

@@ -22,6 +22,15 @@ When the command wants a CHANNEL, USER, MEMBER, or ROLE. This means the ID, name
## Core Commands
These are the base commands for Roxbot that are a part of the core bot. All of them deal with internal management and are, for the most part, unavailable to average users.

### ;about

Outputs info about RoxBot, showing up time, how to report issues, contents of roxbot.conf and credits.
Command Structure:

`;about`


### ;backup

!!! warning "Required Permissions"

+ 10
- 6
roxbot.py View File

@@ -110,24 +110,28 @@ def check_blacklist(ctx):
@bot.command()
async def about(ctx):
"""
Outputs info about RoxBot, showing up time, how to report issues, what settings where set in prefs.ini and credits.
Outputs info about RoxBot, showing up time, how to report issues, contents of roxbot.conf and credits.
"""
owner = bot.get_user(roxbot.owner)
em = discord.Embed(title="About Roxbot", colour=roxbot.EmbedColours.pink, description=roxbot.__description__)
em.set_thumbnail(url=bot.user.avatar_url)
em.add_field(name="Command Prefix", value=roxbot.command_prefix)
em.add_field(name="Bot Version", value=roxbot.__version__)
em.add_field(name="Discord.py version", value=discord.__version__)
em.add_field(name="Owner", value=str(owner))
em.add_field(name="Owner ID", value=roxbot.owner)
em.add_field(name="Bot Version", value=roxbot.__version__)
em.add_field(name="Command Prefix", value=roxbot.command_prefix)
em.add_field(name="Backup Enabled", value=roxbot.backup_enabled)
if roxbot.backup_enabled:
em.add_field(name="Backup Rate", value="{} Minutes".format(int(roxbot.backup_rate/60)))

em.add_field(name="Author", value=roxbot.__author__)
em.add_field(name="Discord.py version", value=discord.__version__)
em.set_footer(text="RoxBot is licensed under the MIT License")


# Do time calc late in the command so that the time returned is closest to when the message is received
uptimeflo = time.time() - start_time
uptime = str(datetime.timedelta(seconds=uptimeflo))
em.add_field(name="Current Uptime", value=str(uptime.split(".")[0]))
em.set_footer(text="RoxBot is licensed under the MIT License")
return await ctx.channel.send(embed=em)



+ 1
- 2
roxbot/__init__.py View File

@@ -20,7 +20,6 @@ Roxbot is designed to be provide many different services for users and modertors

Roxbot also has a focus on being inclusive and being fun for all kinds of people. Roxbot is a bot written by a queer woman with the lgbt community in mind.


[Github link](https://github.com/roxxers/roxbot)
[Changelog](https://github.com/roxxers/roxbot/blob/master/CHANGELOG.md)
[Docs](https://roxxers.github.io/roxbot/)
@@ -49,7 +48,7 @@ if config["Backups"]["enabled"] == "False":
backup_enabled = False
else:
backup_enabled = True
backup_rate = config["Backups"]["rate"] * 60 # Convert minutes to seconds
backup_rate = int(config["Backups"]["rate"]) * 60 # Convert minutes to seconds


datetime_formatting = "{:%a %Y/%m/%d %H:%M:%S} UTC"

Loading…
Cancel
Save