Browse Source

fixed guild command because it was baaaaaad.

tags/v1.6.0
Roxie Gibson 6 years ago
parent
commit
1299d5cce7
2 changed files with 17 additions and 9 deletions
  1. +6
    -5
      README.md
  2. +11
    -4
      Roxbot/cogs/util.py

+ 6
- 5
README.md View File

_Coming Soon_ _Coming Soon_


## Command Docs ## Command Docs
*Coming soon*
*Coming Soon*


## Changelog ## Changelog


- Internal settings now have automatic and manual local backups. Manual backups activated by the `backup` command. - Internal settings now have automatic and manual local backups. Manual backups activated by the `backup` command.
###### Minor Changes ###### Minor Changes
- Logging is now easier internally. - Logging is now easier internally.
- Logging output has been improved for the aesthetics command.
- The subreddit command has logging. Only when it is being directly invoked and not when an inbuilt command is being used.
- Added who the waifu command is dedicated to in the command description.
- Added more helpful error handling for MissingRequiredArgument, BadArgument, MissingPermissions, and BotMissingPermissions errors.
- Logging output has been improved for the `aesthetics` command.
- The `subreddit` command has logging. Only when it is being directly invoked and not when an inbuilt command is being used.
- Added who the `waifurate` command is dedicated to in the command description.
- Added more helpful error handling for `MissingRequiredArgument`, `BadArgument`, `MissingPermissions`, and `BotMissingPermissions` errors.
- Reddit cog got some lovely refactoring, which includes some author credit when posting. - Reddit cog got some lovely refactoring, which includes some author credit when posting.
- Fixed `guild` command because that was really messed up and wasn't at all helpful.
###### Bug Fixes ###### Bug Fixes
- ";-;" and other similar text emoticons now no longer raises the CommandNotFound error. - ";-;" and other similar text emoticons now no longer raises the CommandNotFound error.



+ 11
- 4
Roxbot/cogs/util.py View File

embed = discord.Embed(title=guild.name, colour=guild.me.colour.value) embed = discord.Embed(title=guild.name, colour=guild.me.colour.value)
embed.set_thumbnail(url=guild_icon_url) embed.set_thumbnail(url=guild_icon_url)
embed.add_field(name="ID", value=guild.id, inline=False) embed.add_field(name="ID", value=guild.id, inline=False)
embed.add_field(name="Owner", value="{} ({})".format(self.bot.get_user(guild.owner_id), guild.owner_id), inline=False)
embed.add_field(name="Created at", value="{:%a %Y/%m/%d %H:%M:%S} UTC".format(guild.created_at, inline=False)) embed.add_field(name="Created at", value="{:%a %Y/%m/%d %H:%M:%S} UTC".format(guild.created_at, inline=False))
embed.add_field(name="Voice Region", value=guild.region, inline=False) embed.add_field(name="Voice Region", value=guild.region, inline=False)
embed.add_field(name="AFK Timeout", value="{} Minutes".format(guild.afk_timeout/60), inline=False) embed.add_field(name="AFK Timeout", value="{} Minutes".format(guild.afk_timeout/60), inline=False)
if guild.afk_channel: if guild.afk_channel:
embed.add_field(name="AFK Channel", value=guild.afk_channel, inline=False) embed.add_field(name="AFK Channel", value=guild.afk_channel, inline=False)


embed.add_field(name="Owner", value="{} ({})".format(self.bot.get_user(guild.owner_id), guild.owner_id), inline=False)
embed.add_field(name="Verification Level", value=guild.verification_level, inline=False) embed.add_field(name="Verification Level", value=guild.verification_level, inline=False)
embed.add_field(name="Explicit Content Filtering", value=guild.explicit_content_filter, inline=False) embed.add_field(name="Explicit Content Filtering", value=guild.explicit_content_filter, inline=False)
embed.add_field(name="Roles [{}]".format(len(guild.roles)), value="For all roles, use `{}guild roles`.", inline=False)
embed.add_field(name="Emotes [{}]".format(len(guild.emojis)), value="For all emotes, use `{}guild emotes`.".format(self.bot.command_prefix), inline=False)
embed.add_field(name="Members", value=guild.member_count)
number_of_bots = 0
for member in guild.members:
if member.bot:
number_of_bots += 1
human_members = guild.member_count - number_of_bots
embed.add_field(name="Human Members", value=human_members, inline=False)
embed.add_field(name="Roles".format(), value=str(len(guild.roles)), inline=False)
embed.add_field(name="Emotes".format(), value=str(len(guild.emojis)), inline=False)
embed.add_field(name="Channels [{}]".format(len(guild.channels)), value="{} Channel Categories\n{} Text Channels\n{} Voice Channels".format(len(guild.categories), len(guild.text_channels), len(guild.voice_channels))) embed.add_field(name="Channels [{}]".format(len(guild.channels)), value="{} Channel Categories\n{} Text Channels\n{} Voice Channels".format(len(guild.categories), len(guild.text_channels), len(guild.voice_channels)))


if guild.features: if guild.features:
embed.add_field(name="Extra Features", value=guild.features)
embed.add_field(name="Extra Features", value=guild.features, inline=False)
if guild.splash: if guild.splash:
embed.set_image(url=guild_splash_url) embed.set_image(url=guild_splash_url)



Loading…
Cancel
Save